diff --git a/test/HTML5/Html5Test.php b/test/HTML5/Html5Test.php index 26d52fe..bba4ff1 100644 --- a/test/HTML5/Html5Test.php +++ b/test/HTML5/Html5Test.php @@ -11,7 +11,7 @@ class Html5Test extends TestCase */ private $html5; - public function setUp() + protected function setUp() { $this->html5 = $this->getInstance(); } @@ -226,7 +226,7 @@ public function testConfig() { $html5 = $this->getInstance(); $options = $html5->getOptions(); - $this->assertEquals(false, $options['encode_entities']); + $this->assertFalse($options['encode_entities']); $html5 = $this->getInstance(array( 'foo' => 'bar', @@ -234,7 +234,7 @@ public function testConfig() )); $options = $html5->getOptions(); $this->assertEquals('bar', $options['foo']); - $this->assertEquals(true, $options['encode_entities']); + $this->assertTrue($options['encode_entities']); // Need to reset to original so future tests pass as expected. // $this->getInstance()->setOption('encode_entities', false); diff --git a/test/HTML5/Parser/DOMTreeBuilderTest.php b/test/HTML5/Parser/DOMTreeBuilderTest.php index b5940c2..337f203 100644 --- a/test/HTML5/Parser/DOMTreeBuilderTest.php +++ b/test/HTML5/Parser/DOMTreeBuilderTest.php @@ -62,7 +62,7 @@ public function testBareAmpersand() { $html = " - + @@ -74,7 +74,7 @@ public function testBareAmpersand() $this->assertEmpty($this->errors); $this->assertXmlStringEqualsXmlString(' - + @@ -97,7 +97,7 @@ public function testBareAmpersandNotAllowedInAttributes() $this->assertCount(2, $this->errors); $this->assertXmlStringEqualsXmlString(' - + @@ -108,7 +108,7 @@ public function testBareAmpersandNotAllowedInBody() { $html = ' - + a&b a&= a&=c @@ -122,7 +122,7 @@ public function testBareAmpersandNotAllowedInBody() $this->assertCount(5, $this->errors); $this->assertXmlStringEqualsXmlString(' - + a&b a&= a&=c @@ -467,7 +467,7 @@ public function testParseErrors() // We're JUST testing that we can access errors. Actual testing of // error messages happen in the Tokenizer's tests. $this->assertGreaterThan(0, count($this->errors)); - $this->assertTrue(is_string($this->errors[0])); + $this->assertInternalType('string', $this->errors[0]); } public function testProcessingInstruction() diff --git a/test/HTML5/Serializer/OutputRulesTest.php b/test/HTML5/Serializer/OutputRulesTest.php index 9130516..f58069e 100644 --- a/test/HTML5/Serializer/OutputRulesTest.php +++ b/test/HTML5/Serializer/OutputRulesTest.php @@ -24,7 +24,7 @@ class OutputRulesTest extends \Masterminds\HTML5\Tests\TestCase */ protected $html5; - public function setUp() + protected function setUp() { $this->html5 = $this->getInstance(); } @@ -645,8 +645,8 @@ public function testHandlingInvalidRawContent() $contents = $this->html5->saveHTML($dom); - $this->assertTrue(false !== strpos($contents, '')); +

Bar

', $contents); } } diff --git a/test/HTML5/Serializer/TraverserTest.php b/test/HTML5/Serializer/TraverserTest.php index d4ae7b3..edb0fd2 100644 --- a/test/HTML5/Serializer/TraverserTest.php +++ b/test/HTML5/Serializer/TraverserTest.php @@ -18,7 +18,7 @@ class TraverserTest extends \Masterminds\HTML5\Tests\TestCase '; - public function setUp() + protected function setUp() { $this->html5 = $this->getInstance(); } @@ -45,7 +45,7 @@ public function getTraverser() $stream = fopen('php://temp', 'w'); $dom = $this->html5->loadHTML($this->markup); - $t = new Traverser($dom, $stream, $html5->getOptions()); + $t = new Traverser($dom, $stream, $this->html5->getOptions()); // We return both the traverser and stream so we can pull from it. return array(