mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
17 lines
685 B
PHP
17 lines
685 B
PHP
<?php
|
|
|
|
use Pest\Expectations\OppositeExpectation;
|
|
use PHPUnit\Framework\ExpectationFailedException;
|
|
|
|
it('throw expectation failed exception with string argument', function (): void {
|
|
$expectation = new OppositeExpectation(expect('foo'));
|
|
|
|
$expectation->throwExpectationFailedException('toBe', 'bar');
|
|
})->throws(ExpectationFailedException::class, "Expecting 'foo' not to be 'bar'.");
|
|
|
|
it('throw expectation failed exception with array argument', function (): void {
|
|
$expectation = new OppositeExpectation(expect('foo'));
|
|
|
|
$expectation->throwExpectationFailedException('toBe', ['bar']);
|
|
})->throws(ExpectationFailedException::class, "Expecting 'foo' not to be 'bar'.");
|