mirror of
https://github.com/pestphp/pest.git
synced 2026-03-09 01:07:23 +01:00
feat(expect): add more methods
This commit is contained in:
17
tests/Expect/toContainStringIgnoringCase.php
Normal file
17
tests/Expect/toContainStringIgnoringCase.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
use PHPUnit\Framework\ExpectationFailedException;
|
||||
|
||||
test('ignore difference in casing', function () {
|
||||
expect('hello world')->toContainStringIgnoringCase('world');
|
||||
expect('hello world')->toContainStringIgnoringCase('World');
|
||||
});
|
||||
|
||||
test('failures', function () {
|
||||
expect('hello world')->toContainStringIgnoringCase('hi');
|
||||
})->throws(ExpectationFailedException::class);
|
||||
|
||||
test('not failures', function () {
|
||||
expect('hello world')->not->toContainStringIgnoringCase('Hello');
|
||||
expect('hello world')->not->toContainStringIgnoringCase('hello');
|
||||
})->throws(ExpectationFailedException::class);
|
||||
Reference in New Issue
Block a user