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