mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
17 lines
421 B
PHP
17 lines
421 B
PHP
<?php
|
|
|
|
use PHPUnit\Framework\ExpectationFailedException;
|
|
|
|
test('pass', function () {
|
|
expect((object) ['a' => 1])->toBeObject();
|
|
expect(['a' => 1])->not->toBeObject();
|
|
});
|
|
|
|
test('failures', function () {
|
|
expect(null)->toBeObject();
|
|
})->throws(ExpectationFailedException::class);
|
|
|
|
test('not failures', function () {
|
|
expect((object) 'ciao')->not->toBeObject();
|
|
})->throws(ExpectationFailedException::class);
|