File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
6565declare(strict_types=1);
6666
67- namespace Tests;
67+ namespace Tests\Unit ;
6868
6969use Testo\Assert;
7070use 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);
Original file line number Diff line number Diff 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
6060declare(strict_types=1);
6161
62- namespace Tests;
62+ namespace Tests\Unit ;
6363
6464use Testo\Assert;
6565use 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);
You can’t perform that action at this time.
0 commit comments