mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
17 lines
431 B
PHP
17 lines
431 B
PHP
<?php
|
|
|
|
use PHPUnit\Framework\ExpectationFailedException;
|
|
|
|
test('passes', function () {
|
|
expect('a')->toBeIn(['a', 'b', 'c']);
|
|
expect('d')->not->toBeIn(['a', 'b', 'c']);
|
|
});
|
|
|
|
test('failures', function () {
|
|
expect('d')->toBeIn(['a', 'b', 'c']);
|
|
})->throws(ExpectationFailedException::class);
|
|
|
|
test('not failures', function () {
|
|
expect('a')->not->toBeIn(['a', 'b', 'c']);
|
|
})->throws(ExpectationFailedException::class);
|