mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
feat: move Expectations API out of external plugin
This commit is contained in:
16
tests/Features/Expect/toBeArray.php
Normal file
16
tests/Features/Expect/toBeArray.php
Normal 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);
|
||||
Reference in New Issue
Block a user