mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
feat(expect): add more methods
This commit is contained in:
15
tests/Expect/toBeReadableDirectory.php
Normal file
15
tests/Expect/toBeReadableDirectory.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
|
||||
test('pass', function () {
|
||||
expect(sys_get_temp_dir())->toBeReadableDirectory();
|
||||
});
|
||||
|
||||
test('failures', function () {
|
||||
expect('/random/path/whatever')->toBeReadableDirectory();
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
test('not failures', function () {
|
||||
expect(sys_get_temp_dir())->not->toBeReadableDirectory();
|
||||
})->throws(ExpectationFailedException::class);
|
||||
Reference in New Issue
Block a user