Skip to content

Commit 0f72027

Browse files
committed
Fix CLI docs
1 parent 450c7ee commit 0f72027

File tree

3 files changed

+72
-58
lines changed

3 files changed

+72
-58
lines changed

CLAUDE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ ru/ # Russian locale (same structure)
3232
2. Add to sidebar in `.vitepress/config.mts` for both locales
3333
3. Internal links: `./page` or `/docs/page` (no `.html`)
3434

35+
**Syncing translations:**
36+
- **CRITICAL:** When changing documentation content (adding sections, examples, explanations), ALWAYS update BOTH English and Russian versions
37+
- This applies to content changes, NOT just translation quality fixes
38+
- If you modify `docs/page.md`, you MUST also update `ru/docs/page.md` with the translated version
39+
- Exception: Only fixing translation quality in `ru/` doesn't require touching English version
40+
3541
**Dead links:** Create stub with `::: tip Coming Soon` block
3642

3743
**Styles:** `.vitepress/theme/style.css` - brand colors `--vp-c-brand-1`, responsive breakpoints 960px/640px

docs/cli-reference.md

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,32 @@
22

33
This document describes the command line interface for Testo.
44

5+
::: info Binary Path
6+
If Testo is installed via Composer, the binary path will be `vendor/bin/testo`. The examples below use just `testo` for brevity, but in real projects use `vendor/bin/testo` or set up an alias in your environment.
7+
:::
8+
59
## Commands
610

7-
### `run`
11+
### `testo run`
812

913
Execute test suites with optional filtering and output formatting.
1014

1115
This is the default command and can be omitted when using flags.
1216

1317
```bash
14-
./bin/testo run [options]
15-
./bin/testo [options] # run is optional
18+
testo run [options]
19+
testo [options] # run is optional
1620
```
1721

1822
**Examples:**
1923
```bash
2024
# Explicit run command
21-
./bin/testo run
22-
./bin/testo run --suite=Unit
25+
testo run
26+
testo run --suite=Unit
2327

2428
# Implicit run command (default)
25-
./bin/testo
26-
./bin/testo --suite=Unit
29+
testo
30+
testo --suite=Unit
2731
```
2832

2933
## Common Configuration Flags
@@ -36,8 +40,8 @@ Specify path to configuration file.
3640

3741
**Examples:**
3842
```bash
39-
./bin/testo run --config=./custom-testo.php
40-
./bin/testo run --suite=Integration --config=./ci-testo.php
43+
testo run --config=./custom-testo.php
44+
testo run --suite=Integration --config=./ci-testo.php
4145
```
4246

4347
## Running Tests
@@ -52,8 +56,8 @@ Used by the [Testo plugin](https://plugins.jetbrains.com/plugin/28842-testo) for
5256

5357
**Examples:**
5458
```bash
55-
./bin/testo --teamcity
56-
./bin/testo --suite=Unit --teamcity
59+
testo --teamcity
60+
testo --suite=Unit --teamcity
5761
```
5862

5963
### Filtering
@@ -76,10 +80,10 @@ Filter tests by test suite name. Suites are defined in configuration.
7680
**Examples:**
7781
```bash
7882
# Single suite
79-
./bin/testo run --suite=Unit
83+
testo run --suite=Unit
8084

8185
# Multiple suites
82-
./bin/testo run --suite=Unit --suite=Integration
86+
testo run --suite=Unit --suite=Integration
8387
```
8488

8589
#### `--path`
@@ -95,16 +99,16 @@ Filter test files by glob patterns. Supports wildcards: `*`, `?`, `[abc]`
9599
**Examples:**
96100
```bash
97101
# Matches tests/Unit*
98-
./bin/testo run --path="tests/Unit"
102+
testo run --path="tests/Unit"
99103

100104
# Matches tests/Unit/*Test.php
101-
./bin/testo run --path="tests/Unit/*Test.php"
105+
testo run --path="tests/Unit/*Test.php"
102106

103107
# Multiple paths
104-
./bin/testo run --path="tests/Unit" --path="tests/Integration"
108+
testo run --path="tests/Unit" --path="tests/Integration"
105109

106110
# Nested directories
107-
./bin/testo run --path="tests/*/Security/*Test.php"
111+
testo run --path="tests/*/Security/*Test.php"
108112
```
109113

110114
#### `--filter`
@@ -121,23 +125,23 @@ Filter tests by class, method, or function names.
121125
**Examples:**
122126
```bash
123127
# Specific method
124-
./bin/testo run --filter=UserTest::testLogin
128+
testo run --filter=UserTest::testLogin
125129

126130
# Entire class
127-
./bin/testo run --filter=UserTest
131+
testo run --filter=UserTest
128132

129133
# By FQN
130-
./bin/testo run --filter=Tests\Unit\UserTest
134+
testo run --filter=Tests\Unit\UserTest
131135

132136
# Method name across all classes
133-
./bin/testo run --filter=testLogin
137+
testo run --filter=testLogin
134138

135139
# Multiple filters (OR)
136-
./bin/testo run --filter=UserTest::testCreate --filter=UserTest::testUpdate
140+
testo run --filter=UserTest::testCreate --filter=UserTest::testUpdate
137141

138142
# Combine with other filters (AND)
139-
./bin/testo run --filter=testAuthentication --suite=Unit
140-
./bin/testo run --filter=UserTest --path="tests/Unit"
143+
testo run --filter=testAuthentication --suite=Unit
144+
testo run --filter=UserTest --path="tests/Unit"
141145
```
142146

143147
**Filter Behavior:** See [Filtering](/docs/filtering) for details.
@@ -147,16 +151,16 @@ Filter tests by class, method, or function names.
147151
**Examples:**
148152
```bash
149153
# Name AND suite
150-
./bin/testo run --filter=testLogin --suite=Unit
154+
testo run --filter=testLogin --suite=Unit
151155

152156
# Name AND path
153-
./bin/testo run --filter=UserTest --path="tests/Unit"
157+
testo run --filter=UserTest --path="tests/Unit"
154158

155159
# All three types (AND)
156-
./bin/testo run --filter=testImportant --path="tests/Unit" --suite=Critical
160+
testo run --filter=testImportant --path="tests/Unit" --suite=Critical
157161

158162
# Multiple values with multiple types
159-
./bin/testo run \
163+
testo run \
160164
--filter=testCreate --filter=testUpdate \
161165
--path="tests/Unit" --path="tests/Integration" \
162166
--suite=Critical

ru/docs/cli-reference.md

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,32 @@
22

33
Этот документ описывает интерфейс командной строки для Testo.
44

5+
::: info Путь к бинарнику
6+
Если Testo установлен через Composer, путь до бинарника будет `vendor/bin/testo`. В примерах ниже используется просто `testo` для краткости, но в реальных проектах используйте `vendor/bin/testo` или настройте алиас в вашем окружении.
7+
:::
8+
59
## Команды
610

7-
### `run`
11+
### `testo run`
812

9-
Выполнить наборы тестов с опциональной фильтрацией и форматированием вывода.
13+
Выполнить комплекты тестов с опциональной фильтрацией и форматированием вывода.
1014

1115
Это команда по умолчанию и может быть опущена при использовании флагов.
1216

1317
```bash
14-
./bin/testo run [options]
15-
./bin/testo [options] # run опциональна
18+
testo run [options]
19+
testo [options] # run опциональна
1620
```
1721

1822
**Примеры:**
1923
```bash
2024
# Явная команда run
21-
./bin/testo run
22-
./bin/testo run --suite=Unit
25+
testo run
26+
testo run --suite=Unit
2327

2428
# Неявная команда run (по умолчанию)
25-
./bin/testo
26-
./bin/testo --suite=Unit
29+
testo
30+
testo --suite=Unit
2731
```
2832

2933
## Общие флаги конфигурации
@@ -36,8 +40,8 @@
3640

3741
**Примеры:**
3842
```bash
39-
./bin/testo run --config=./custom-testo.php
40-
./bin/testo run --suite=Integration --config=./ci-testo.php
43+
testo run --config=./custom-testo.php
44+
testo run --suite=Integration --config=./ci-testo.php
4145
```
4246

4347
## Запуск тестов
@@ -52,8 +56,8 @@
5256

5357
**Примеры:**
5458
```bash
55-
./bin/testo --teamcity
56-
./bin/testo --suite=Unit --teamcity
59+
testo --teamcity
60+
testo --suite=Unit --teamcity
5761
```
5862

5963
### Фильтрация
@@ -69,17 +73,17 @@ Testo предоставляет три типа фильтров, которы
6973

7074
#### `--suite`
7175

72-
Фильтрация тестов по имени набора тестов. Наборы определяются в конфигурации.
76+
Фильтрация тестов по имени комплекта тестов. Комплекты определяются в конфигурации.
7377

7478
**Повторяемый:** Да (логика ИЛИ)
7579

7680
**Примеры:**
7781
```bash
7882
# Один набор
79-
./bin/testo run --suite=Unit
83+
testo run --suite=Unit
8084

8185
# Несколько наборов
82-
./bin/testo run --suite=Unit --suite=Integration
86+
testo run --suite=Unit --suite=Integration
8387
```
8488

8589
#### `--path`
@@ -95,16 +99,16 @@ Testo предоставляет три типа фильтров, которы
9599
**Примеры:**
96100
```bash
97101
# Соответствует tests/Unit*
98-
./bin/testo run --path="tests/Unit"
102+
testo run --path="tests/Unit"
99103

100104
# Соответствует tests/Unit/*Test.php
101-
./bin/testo run --path="tests/Unit/*Test.php"
105+
testo run --path="tests/Unit/*Test.php"
102106

103107
# Несколько путей
104-
./bin/testo run --path="tests/Unit" --path="tests/Integration"
108+
testo run --path="tests/Unit" --path="tests/Integration"
105109

106110
# Вложенные директории
107-
./bin/testo run --path="tests/*/Security/*Test.php"
111+
testo run --path="tests/*/Security/*Test.php"
108112
```
109113

110114
#### `--filter`
@@ -121,23 +125,23 @@ Testo предоставляет три типа фильтров, которы
121125
**Примеры:**
122126
```bash
123127
# Конкретный метод
124-
./bin/testo run --filter=UserTest::testLogin
128+
testo run --filter=UserTest::testLogin
125129

126130
# Весь класс
127-
./bin/testo run --filter=UserTest
131+
testo run --filter=UserTest
128132

129133
# По FQN
130-
./bin/testo run --filter=Tests\Unit\UserTest
134+
testo run --filter=Tests\Unit\UserTest
131135

132136
# Имя метода во всех классах
133-
./bin/testo run --filter=testLogin
137+
testo run --filter=testLogin
134138

135139
# Несколько фильтров (ИЛИ)
136-
./bin/testo run --filter=UserTest::testCreate --filter=UserTest::testUpdate
140+
testo run --filter=UserTest::testCreate --filter=UserTest::testUpdate
137141

138142
# Комбинация с другими фильтрами (И)
139-
./bin/testo run --filter=testAuthentication --suite=Unit
140-
./bin/testo run --filter=UserTest --path="tests/Unit"
143+
testo run --filter=testAuthentication --suite=Unit
144+
testo run --filter=UserTest --path="tests/Unit"
141145
```
142146

143147
**Поведение фильтров:** Подробности в разделе [Фильтрация](/ru/docs/filtering).
@@ -147,16 +151,16 @@ Testo предоставляет три типа фильтров, которы
147151
**Примеры:**
148152
```bash
149153
# Имя И набор
150-
./bin/testo run --filter=testLogin --suite=Unit
154+
testo run --filter=testLogin --suite=Unit
151155

152156
# Имя И путь
153-
./bin/testo run --filter=UserTest --path="tests/Unit"
157+
testo run --filter=UserTest --path="tests/Unit"
154158

155159
# Все три типа (И)
156-
./bin/testo run --filter=testImportant --path="tests/Unit" --suite=Critical
160+
testo run --filter=testImportant --path="tests/Unit" --suite=Critical
157161

158162
# Несколько значений с несколькими типами
159-
./bin/testo run \
163+
testo run \
160164
--filter=testCreate --filter=testUpdate \
161165
--path="tests/Unit" --path="tests/Integration" \
162166
--suite=Critical

0 commit comments

Comments
 (0)