feat(expect): add more methods

This commit is contained in:
ceceppa
2020-07-16 07:34:43 +01:00
parent 1e61144cd2
commit f0f79ab244
5 changed files with 110 additions and 3 deletions

View File

@ -0,0 +1,17 @@
<?php
use PHPUnit\Framework\ExpectationFailedException;
test('pass', function () {
$temp = sys_get_temp_dir();
expect($temp)->toBeDirectory();
});
test('failures', function () {
expect('/random/path/whatever')->toBeDirectory();
})->throws(ExpectationFailedException::class);
test('not failures', function () {
expect('.')->not->toBeDirectory();
})->throws(ExpectationFailedException::class);