Files
pest/tests/Fixtures/Tia/app/tests/Unit/CalculatorTest.php
T
nuno maduro d112582857 wip
2026-08-05 19:58:57 +01:00

17 lines
463 B
PHP

<?php
declare(strict_types=1);
use Fixture\App\Calculator;
// `test()` rather than `it()`: the harness seeds results by test id, and `it()`
// would prefix every description with `it `, leaving Project::TESTS a step away
// from what is written here.
test('adds two numbers', function (): void {
expect((new Calculator)->add(1, 2))->toBe(3);
});
test('subtracts two numbers', function (): void {
expect((new Calculator)->subtract(3, 1))->toBe(2);
});