Skip to content

Commit b1a20a9

Browse files
authored
Merge pull request #68 from open-source-contributions/master
Using assertSame to make assertion equal strict
2 parents c506b7e + 97c02e8 commit b1a20a9

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tests/ReadabilityTest.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public function testConstructHtml5Parser()
2626
{
2727
$readability = $this->getReadability('<html/>', 'http://0.0.0.0', 'html5lib');
2828

29-
$this->assertEquals('http://0.0.0.0', $readability->url);
29+
$this->assertSame('http://0.0.0.0', $readability->url);
3030
$this->assertInstanceOf('DomDocument', $readability->dom);
31-
$this->assertEquals('<html/>', $readability->original_html);
31+
$this->assertSame('<html/>', $readability->original_html);
3232
}
3333

3434
/**
@@ -38,9 +38,9 @@ public function testConstructSimple()
3838
{
3939
$readability = $this->getReadability('<html/>', 'http://0.0.0.0');
4040

41-
$this->assertEquals('http://0.0.0.0', $readability->url);
41+
$this->assertSame('http://0.0.0.0', $readability->url);
4242
$this->assertInstanceOf('DomDocument', $readability->dom);
43-
$this->assertEquals('<html/>', $readability->original_html);
43+
$this->assertSame('<html/>', $readability->original_html);
4444
$this->assertTrue($readability->tidied);
4545
}
4646

@@ -49,7 +49,7 @@ public function testConstructDefaultWithoutTidy()
4949
$readability = $this->getReadability('', null, 'libxml', false);
5050

5151
$this->assertNull($readability->url);
52-
$this->assertEquals('', $readability->original_html);
52+
$this->assertSame('', $readability->original_html);
5353
$this->assertFalse($readability->tidied);
5454

5555
$this->assertInstanceOf('DomDocument', $readability->dom);
@@ -59,9 +59,9 @@ public function testConstructSimpleWithoutTidy()
5959
{
6060
$readability = $this->getReadability('<html/>', 'http://0.0.0.0', 'libxml', false);
6161

62-
$this->assertEquals('http://0.0.0.0', $readability->url);
62+
$this->assertSame('http://0.0.0.0', $readability->url);
6363
$this->assertInstanceOf('DomDocument', $readability->dom);
64-
$this->assertEquals('<html/>', $readability->original_html);
64+
$this->assertSame('<html/>', $readability->original_html);
6565
$this->assertFalse($readability->tidied);
6666
}
6767

@@ -277,7 +277,7 @@ public function testTitle()
277277
$this->assertTrue($res);
278278
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
279279
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
280-
$this->assertEquals('this is my title', $readability->getTitle()->getInnerHtml());
280+
$this->assertSame('this is my title', $readability->getTitle()->getInnerHtml());
281281
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
282282
$this->assertStringNotContainsString('This text is also an awesome text and you should know that', $readability->getContent()->getInnerHtml());
283283
}
@@ -291,7 +291,7 @@ public function testTitleWithDash()
291291
$this->assertTrue($res);
292292
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
293293
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
294-
$this->assertEquals('title2 - title3', $readability->getTitle()->getInnerHtml());
294+
$this->assertSame('title2 - title3', $readability->getTitle()->getInnerHtml());
295295
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
296296
$this->assertStringNotContainsString('This text is also an awesome text and you should know that', $readability->getContent()->getInnerHtml());
297297
}
@@ -305,7 +305,7 @@ public function testTitleWithDoubleDot()
305305
$this->assertTrue($res);
306306
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
307307
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
308-
$this->assertEquals('title2 : title3', $readability->getTitle()->getInnerHtml());
308+
$this->assertSame('title2 : title3', $readability->getTitle()->getInnerHtml());
309309
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
310310
$this->assertStringNotContainsString('This text is also an awesome text and you should know that', $readability->getContent()->getInnerHtml());
311311
}
@@ -319,7 +319,7 @@ public function testTitleTooShortUseH1()
319319
$this->assertTrue($res);
320320
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getContent());
321321
$this->assertInstanceOf('Readability\JSLikeHTMLElement', $readability->getTitle());
322-
$this->assertEquals('this is my h1 title !', $readability->getTitle()->getInnerHtml());
322+
$this->assertSame('this is my h1 title !', $readability->getTitle()->getInnerHtml());
323323
$this->assertStringContainsString('This is an awesome text with some links, here there are', $readability->getContent()->getInnerHtml());
324324
$this->assertStringNotContainsString('This text is also an awesome text and you should know that', $readability->getContent()->getInnerHtml());
325325
}

0 commit comments

Comments
 (0)