public static function PHPUnit_Framework_Assert::assertNotTag in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/phpunit/src/Framework/Assert.php \PHPUnit_Framework_Assert::assertNotTag()
This assertion is the exact opposite of assertTag().
Rather than asserting that $matcher results in a match, it asserts that $matcher does not match.
@since Method available since Release 3.3.0
Parameters
array $matcher:
string $actual:
string $message:
bool $isHtml:
Deprecated
@codeCoverageIgnore
File
- vendor/
phpunit/ phpunit/ src/ Framework/ Assert.php, line 2160
Class
- PHPUnit_Framework_Assert
- A set of assert methods.
Code
public static function assertNotTag($matcher, $actual, $message = '', $isHtml = true) {
trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED);
$dom = PHPUnit_Util_XML::load($actual, $isHtml);
$tags = PHPUnit_Util_XML::findNodes($dom, $matcher, $isHtml);
$matched = count($tags) > 0 && $tags[0] instanceof DOMNode;
self::assertFalse($matched, $message);
}