mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
16 lines
389 B
PHP
16 lines
389 B
PHP
<?php
|
|
|
|
use PHPUnit\Framework\ExpectationFailedException;
|
|
|
|
test('pass', function () {
|
|
expect('username')->toEndWith('name');
|
|
});
|
|
|
|
test('failures', function () {
|
|
expect('username')->toEndWith('password');
|
|
})->throws(ExpectationFailedException::class);
|
|
|
|
test('not failures', function () {
|
|
expect('username')->not->toEndWith('name');
|
|
})->throws(ExpectationFailedException::class);
|