Skip to content

Commit e1f9327

Browse files
authored
Merge pull request #1 from W0rma/add-assert-string-ends-with
Add assertStringEndsWith and assertStringEndsNotWith
2 parents 7f0e038 + 9364ef3 commit e1f9327

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/Codeception/Module/Asserts.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ class Asserts extends CodeceptionModule
4848
assertCount as public;
4949
assertStringStartsWith as public;
5050
assertStringStartsNotWith as public;
51+
assertStringEndsWith as public;
52+
assertStringEndsNotWith as public;
5153
assertNotTrue as public;
5254
assertNotFalse as public;
5355
assertStringContainsString as public;

tests/unit/Codeception/Module/AssertsTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public function testAsserts()
2525
$this->module->assertNotRegExp('/^[a-z]$/', '1');
2626
$this->module->assertStringStartsWith('fo', 'foo');
2727
$this->module->assertStringStartsNotWith('ba', 'foo');
28+
$this->module->assertStringEndsWith('oo', 'foo');
29+
$this->module->assertStringEndsNotWith('fo', 'foo');
2830
$this->module->assertEmpty([]);
2931
$this->module->assertNotEmpty([1]);
3032
$this->module->assertNull(null);

0 commit comments

Comments
 (0)