Familiar OOP
Tests are classes without TestCase inheritance or functions. Code stays clean.
Built for developers, who crave bread-and-butter tests with juicy environment control.
🚧 Work in Progress
Testo is still under active development and not ready for production use. Feel free to explore and experiment, but don't rely on it for real projects yet.
Want to support the project? Star the repo or become a sponsor.
Assertion functions are split into semantic groups:
Assert:: facade — assertions, executed immediatelyExpect:: facade — expectations, deferred until test completionPipe syntax with type grouping keeps code concise and type-safe.
use Testo\Assert;
// Pipe assertions — grouped by type
Assert::string($email)->contains('@');
Assert::int($age)->greaterThan(18);
Assert::file('config.php')->exists();
Assert::array($order->items)
->allOf(Item::class)
->hasCount(3);Write tests the way that fits your style.
// Explicit test declaration with #[Test] attribute
final class OrderTest
{
#[Test]
public function createsOrderWithItems(): void
{
$order = new Order();
$order->addItem(new Product('Bread'));
Assert::int($order->itemCount())->equals(1);
}
}Native plugin for PhpStorm and IntelliJ IDEA.
Full-featured workflow: run and re-run from gutter icons, navigation between tests and code, debugging with breakpoints, test generation, results tree.
Get Plugin 127