Files
php-template/tests/SimpleTest.php
T
KKlochko 2597cfb7a5
continuous-integration/drone/push Build is passing
Fixed the test.
2023-05-08 12:58:25 +03:00

33 lines
661 B
PHP

<?php
require_once 'src/Simple.php';
use PHPUnit\Framework\TestCase;
class SimpleTest extends TestCase
{
public function testAdd()
{
$simple = new Simple();
$result = $simple->add(2, 3);
$this->assertEquals(5, $result);
}
public function testSubtractFail()
{
$simple = new Simple();
$result = $simple->subtract(4, 2);
// 2 is the right result, therefore I chose not 2.
$this->assertNotEquals(1, $result);
}
public function testSubtract()
{
$simple = new Simple();
$result = $simple->subtract(3, 2);
$this->assertEquals(1, $result);
}
}
?>