feat(expect): makes expect work with pending higher order tests

This commit is contained in:
Nuno Maduro
2020-07-15 00:34:59 +02:00
parent 1aec8bac55
commit e2deaae6c9
8 changed files with 45 additions and 26 deletions

View File

@ -1,5 +1,7 @@
<?php
use function PHPUnit\Framework\assertFalse;
$foo = new stdClass();
$foo->beforeAll = false;
$foo->beforeEach = false;
@ -20,8 +22,8 @@ afterAll(function () {
});
register_shutdown_function(function () use ($foo) {
expect($foo->beforeAll)->toBeFalse();
expect($foo->beforeEach)->toBeFalse();
expect($foo->afterEach)->toBeFalse();
expect($foo->afterAll)->toBeFalse();
assertFalse($foo->beforeAll);
assertFalse($foo->beforeEach);
assertFalse($foo->afterEach);
assertFalse($foo->afterAll);
});