Unit Testing Framework for JPPM
- Add
tester
dependency todevDeps
.
jppm add tester -dev
- Create
tests
directory in root of your package dir. - Create your first test class, e.g
tests/SimpleTest.php
:
use tester\{TestCase, Assert};
class SimpleTest extends TestCase
{
function testFeature()
{
$actual = "expected";
Assert::isEqual("expected", $actual);
}
}
- Run your tests.
jppm test