public static function 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 @author Mike Naberezny <mike@maintainable.com> @author Derek DeVries <derek@maintainable.com>

Parameters

array $matcher:

string $actual:

string $message:

boolean $isHtml:

2 calls to PHPUnit_Framework_Assert::assertNotTag()
Framework_AssertTest::testAssertNotTagContentAttributes in drupal/core/vendor/phpunit/phpunit/Tests/Framework/AssertTest.php
@covers PHPUnit_Framework_Assert::assertNotTag @expectedException PHPUnit_Framework_AssertionFailedError
Framework_AssertTest::testAssertNotTagTypeIdFalse in drupal/core/vendor/phpunit/phpunit/Tests/Framework/AssertTest.php
@covers PHPUnit_Framework_Assert::assertNotTag

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/Assert.php, line 2113

Class

PHPUnit_Framework_Assert
A set of assert methods.

Code

public static function assertNotTag($matcher, $actual, $message = '', $isHtml = TRUE) {
  $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);
}