You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/getting-started.md
+1-27Lines changed: 1 addition & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,33 +71,7 @@ final class MyFirstTest
71
71
}
72
72
```
73
73
74
-
The `#[Test]` attribute marks the method as a test, and the `Assert` facade checks assertions.
75
-
Testo supports a wide range of assertions via `Assert` and expectations via `Expect`.
76
-
77
-
Use attributes to extend test functionality.
78
-
For example, `#[Retry]` retries a test on failure, and `#[ExpectException]` expects a specific exception:
79
-
80
-
```php
81
-
#[Test]
82
-
final class MyFirstTest
83
-
{
84
-
#[Retry(maxAttempts: 5)] // Retries up to 5 times if test fails
85
-
public function flakyTest(): void
86
-
{
87
-
Assert::same(mt_rand(0, 2), 2);
88
-
}
89
-
90
-
#[ExpectException(\RuntimeException::class)]
91
-
public function throwsException(): never
92
-
{
93
-
throw new \RuntimeException('Expected error');
94
-
}
95
-
}
96
-
```
97
-
98
-
::: question Why `#[Test]` on a class?
99
-
You can put `#[Test]` on a class — then all public methods with return type `void` or `never` become tests.
100
-
:::
74
+
The `#[Test]` attribute marks the method as a test, and the `Assert` facade checks assertions. More about test approaches, attributes, and conventions — in [Writing Tests](writing-tests.md).
Copy file name to clipboardExpand all lines: docs/why-testo.md
+15-11Lines changed: 15 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ Testo was born from the need for an extensible testing framework that could adap
21
21
22
22
## Testo Philosophy
23
23
24
-
### Developer's Full Control
24
+
### Full Control for the Developer
25
25
26
26
From Testo's perspective, **tests are the developer's property, not the framework's**. All metadata and operational data needed by the framework are stored and processed separately.
27
27
@@ -43,18 +43,19 @@ function simpleTest(): void
43
43
44
44
Testo is built on a simple idea: **a small core with a set of DTOs and contracts, and all functionality is built on top of middleware and event system**.
45
45
46
-
The core simply builds several pipelines from middleware, and then do whatever you want. Every framework feature is middleware or event handlers:
46
+
The core simply builds several pipelines from middleware, and then do whatever you want. Every framework feature is middleware or event handlers, packaged into a plugin:
47
47
- Attributes in general
48
48
- Data providers
49
49
- Inline testing
50
50
- Assertion system (`Assert`, `Expect`)
51
51
- CLI rendering and TeamCity
52
+
- ...
52
53
53
54
### Well-Designed API
54
55
55
-
Instead of a bloated `Assert` facade with ~2300 lines (as in PHPUnit), Testo provides:
56
-
-**`Assert`** — for assertions (checked here and now)
57
-
-**`Expect`** — for expectations (checked after test completion)
56
+
Instead of a bloated `Assert` facade, Testo provides:
57
+
-**`Assert`** — for assertions (checked here and now).
58
+
-**`Expect`** — for expectations (checked after test completion).
58
59
-**Pipe assertions** — grouping by types for cleaner code:
59
60
60
61
```php
@@ -74,12 +75,15 @@ Testo comes with a [PhpStorm/IntelliJ IDEA plugin](https://plugins.jetbrains.com
74
75
75
76
## Who Is Testo For?
76
77
77
-
Testo is built for those who:
78
-
- Develop **frameworks** and need deep test integration.
79
-
- Create **SDKs** with specific testing requirements.
80
-
- Build **complex systems** where PHPUnit doesn't provide the needed flexibility.
81
-
- Want **full control** over testing infrastructure.
82
-
- Prefer PHP syntax over JS.
78
+
Testo is for anyone who loves PHP.
79
+
80
+
Open-source developers can count on support for [current PHP versions](https://www.php.net/supported-versions.php).
81
+
Framework and SDK authors get a powerful tool for building their own test environments through Testo integration.
82
+
83
+
Developers on projects get clean tests without needing to learn new syntactic constructs or concepts.
84
+
Flexible settings and the plugin system allow adapting Testo to any project requirements, from simple unit tests to complex integration scenarios.
85
+
86
+
After all, I'm a framework, SDK, and high-load project developer myself, so I know all these pains firsthand.
0 commit comments