mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
18 lines
413 B
PHP
18 lines
413 B
PHP
<?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);
|