init
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
require_once 'vendor/autoload.php';
|
||||
|
||||
class CalculatorTest extends TestCase {
|
||||
private $calculator;
|
||||
|
||||
protected function setUp(): void {
|
||||
$this->calculator = new App\Calculator();
|
||||
}
|
||||
|
||||
public function testAdd() {
|
||||
$this->assertEquals(4, $this->calculator->add(2, 2));
|
||||
$this->assertEquals(0, $this->calculator->add(-1, 1));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user