public static function PHPUnit_Framework_Assert::assertNotRegExp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit/src/Framework/Assert.php \PHPUnit_Framework_Assert::assertNotRegExp()
Asserts that a string does not match a given regular expression.
@since Method available since Release 2.1.0
Parameters
string $pattern:
string $string:
string $message:
3 calls to PHPUnit_Framework_Assert::assertNotRegExp()
- Framework_AssertTest::testAssertNotRegExp in vendor/
phpunit/ phpunit/ tests/ Framework/ AssertTest.php - @covers PHPUnit_Framework_Assert::assertNotRegExp
- Framework_AssertTest::testAssertNotRegExpThrowsException in vendor/
phpunit/ phpunit/ tests/ Framework/ AssertTest.php - @covers PHPUnit_Framework_Assert::assertNotRegExp @expectedException PHPUnit_Framework_Exception
- Framework_AssertTest::testAssertNotRegExpThrowsException2 in vendor/
phpunit/ phpunit/ tests/ Framework/ AssertTest.php - @covers PHPUnit_Framework_Assert::assertNotRegExp @expectedException PHPUnit_Framework_Exception
File
- vendor/
phpunit/ phpunit/ src/ Framework/ Assert.php, line 1422
Class
- PHPUnit_Framework_Assert
- A set of assert methods.
Code
public static function assertNotRegExp($pattern, $string, $message = '') {
if (!is_string($pattern)) {
throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
}
if (!is_string($string)) {
throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
}
$constraint = new PHPUnit_Framework_Constraint_Not(new PHPUnit_Framework_Constraint_PCREMatch($pattern));
self::assertThat($string, $constraint, $message);
}