Add PHPUnit example
This commit is contained in:
parent
a98d4ff909
commit
a47b07c5f0
7 changed files with 1766 additions and 0 deletions
18
php/phpunit/tests/CalculatorTest.php
Normal file
18
php/phpunit/tests/CalculatorTest.php
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Tests;
|
||||
|
||||
use App\Calculator;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class CalculatorTest extends TestCase
|
||||
{
|
||||
public function test_add(): void
|
||||
{
|
||||
$calculator = new Calculator();
|
||||
|
||||
$this->assertSame(3, $calculator->add(1, 2));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue