public function TokenizerTest::assertEventEquals in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/masterminds/html5/test/HTML5/Parser/TokenizerTest.php \Masterminds\HTML5\Tests\Parser\TokenizerTest::assertEventEquals()
Tests that an event matches both the event type and the expected value.
Parameters
string $type: Expected event type.
string $expects: The value expected in $event['data'][0].
13 calls to TokenizerTest::assertEventEquals()
- TokenizerTest::isAllGood in vendor/
masterminds/ html5/ test/ HTML5/ Parser/ TokenizerTest.php - Asserts that all of the tests are good.
- TokenizerTest::testBogusComment in vendor/
masterminds/ html5/ test/ HTML5/ Parser/ TokenizerTest.php - TokenizerTest::testComment in vendor/
masterminds/ html5/ test/ HTML5/ Parser/ TokenizerTest.php - TokenizerTest::testDoctype in vendor/
masterminds/ html5/ test/ HTML5/ Parser/ TokenizerTest.php - TokenizerTest::testEndTag in vendor/
masterminds/ html5/ test/ HTML5/ Parser/ TokenizerTest.php
File
- vendor/
masterminds/ html5/ test/ HTML5/ Parser/ TokenizerTest.php, line 22
Class
Namespace
Masterminds\HTML5\Tests\ParserCode
public function assertEventEquals($type, $expects, $event) {
$this
->assertEquals($type, $event['name'], "Event {$type} for " . print_r($event, true));
if (is_array($expects)) {
$this
->assertEquals($expects, $event['data'], "Event {$type} should equal " . print_r($expects, true) . ": " . print_r($event, true));
}
else {
$this
->assertEquals($expects, $event['data'][0], "Event {$type} should equal {$expects}: " . print_r($event, true));
}
}