diff options
author | Asmir Mustafic <[email protected]> | 2015-05-09 10:18:45 +0200 |
---|---|---|
committer | Asmir Mustafic <[email protected]> | 2015-05-09 10:18:45 +0200 |
commit | 93df3656bbb4b7718a177c257fa44f8c981c4c5a (patch) | |
tree | 032f2fceed23630512911ba5c4d9dd054da8d0b3 /test/HTML5/Serializer | |
parent | 6222ad4d1e4120a1f154caf8b0e25f4daa921da8 (diff) |
Improved boolean attribute handling
Diffstat (limited to 'test/HTML5/Serializer')
-rw-r--r-- | test/HTML5/Serializer/OutputRulesTest.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/HTML5/Serializer/OutputRulesTest.php b/test/HTML5/Serializer/OutputRulesTest.php index aa2e0c5..72d1cd3 100644 --- a/test/HTML5/Serializer/OutputRulesTest.php +++ b/test/HTML5/Serializer/OutputRulesTest.php @@ -460,8 +460,10 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase array('<input type="radio" readonly>'), array('<input type="radio" checked disabled>'), array('<input type="checkbox" checked disabled>'), + array('<input type="radio" value="" checked disabled>'), + array('<div data-value=""></div>'), array('<select disabled></select>'), - array('<div ng-app>foo</div>'), + array('<div ng-app></div>'), array('<script defer></script>'), ); } @@ -482,7 +484,11 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase $m->invoke($r, $node); $content = stream_get_contents($stream, - 1, 0); - $this->assertContains($content, $html); + + $html = preg_replace('~<[a-z]+(.*)></[a-z]+>~', '\1', $html); + $html = preg_replace('~<[a-z]+(.*)/?>~', '\1', $html); + + $this->assertEquals($content, $html); } |