Skip to content

Commit 4e2f3a4

Browse files
committed
Update test class namespace in getting-started documentation
1 parent 757aab7 commit 4e2f3a4

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

docs/getting-started.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ In this example we defined two test suites: `Unit` for unit tests located in `te
5757

5858
## Writing Your First Test
5959

60-
Create a test class in the configured test directory (e.g., `tests/CalculatorTest.php`):
60+
Create a test class in the configured test directory (e.g., `tests/Unit/CalculatorTest.php`):
6161

6262
```php
6363
<?php
6464

6565
declare(strict_types=1);
6666

67-
namespace Tests;
67+
namespace Tests\Unit;
6868

6969
use Testo\Assert;
7070
use Testo\Assert\ExpectException;
@@ -83,10 +83,9 @@ final class CalculatorTest
8383
}
8484

8585
#[Test]
86-
#[RetryPolicy(maxAttempts: 3)]
86+
#[RetryPolicy(maxAttempts: 3)] // Retries up to 3 times if test fails
8787
public function flakyApiCall(): void
8888
{
89-
// Retries up to 3 times if test fails
9089
$response = $this->makeExternalApiCall();
9190

9291
Assert::same(200, $response->status);

ru/docs/getting-started.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ return new ApplicationConfig(
5252

5353
## Написание первого теста
5454

55-
Создайте тестовый класс в настроенной директории (например, `tests/CalculatorTest.php`):
55+
Создайте тестовый класс в настроенной директории (например, `tests/Unit/CalculatorTest.php`):
5656

5757
```php
5858
<?php
5959

6060
declare(strict_types=1);
6161

62-
namespace Tests;
62+
namespace Tests\Unit;
6363

6464
use Testo\Assert;
6565
use Testo\Assert\ExpectException;
@@ -78,10 +78,9 @@ final class CalculatorTest
7878
}
7979

8080
#[Test]
81-
#[RetryPolicy(maxAttempts: 3)]
81+
#[RetryPolicy(maxAttempts: 3)] // Повторяется до 3 раз при падении теста
8282
public function flakyApiCall(): void
8383
{
84-
// Повторяет до 3 раз при падении теста
8584
$response = $this->makeExternalApiCall();
8685

8786
Assert::same(200, $response->status);

0 commit comments

Comments
 (0)