feat(expect): add more methods

This commit is contained in:
ceceppa
2020-07-14 08:08:13 +01:00
parent d29c789788
commit 819825bdd2
18 changed files with 419 additions and 30 deletions

View File

@ -0,0 +1,16 @@
<?php
use PHPUnit\Framework\ExpectationFailedException;
test('pass', function () {
expect([1, 2, 3])->toBeArray();
expect('1, 2, 3')->not->toBeArray();
});
test('failures', function () {
expect(null)->toBeArray();
})->throws(ExpectationFailedException::class);
test('not failures', function () {
expect(['a', 'b', 'c'])->not->toBeArray();
})->throws(ExpectationFailedException::class);