Skip to content

Commit 5810ae1

Browse files
committed
Implemented assertRegExp and assertNotRegExp from PHPUnit_Framework_Assert.
1 parent aa25c51 commit 5810ae1

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
@@ -22,6 +22,8 @@ class Asserts extends Module
2222
assertLessThanOrEqual as public;
2323
assertContains as public;
2424
assertNotContains as public;
25+
assertRegExp as public;
26+
assertNotRegExp as public;
2527
assertEmpty as public;
2628
assertNotEmpty as public;
2729
assertNull as public;

tests/unit/Codeception/Module/AssertsTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ public function testAsserts()
88
$module->assertContains(1,[1,2]);
99
$module->assertSame(1,1);
1010
$module->assertNotSame(1,true);
11+
$module->assertRegExp('/^[\d]$/','1');
12+
$module->assertNotRegExp('/^[a-z]$/','1');
1113
}
1214

1315
}

0 commit comments

Comments
 (0)