diff options
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/articleenhancer/XPathArticleEnhancerTest.php | 6 | ||||
-rw-r--r-- | tests/unit/db/ItemTest.php | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit/articleenhancer/XPathArticleEnhancerTest.php b/tests/unit/articleenhancer/XPathArticleEnhancerTest.php index 2d207d177..77c5ef2e7 100644 --- a/tests/unit/articleenhancer/XPathArticleEnhancerTest.php +++ b/tests/unit/articleenhancer/XPathArticleEnhancerTest.php @@ -181,10 +181,10 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase { $result = $this->testEnhancer->enhance($item); $this->assertEquals('<div>' . - '<a target="_blank" ' . + '<a target="_blank" rel="noreferrer" ' . 'href="https://www.explosm.net/a/relative/url.html?a=1#b">' . 'link</a>' . - '<a target="_blank" ' . + '<a target="_blank" rel="noreferrer" ' . 'href="https://www.explosm.net/all/b/relative/url.html">' . 'link2</a>' . '<img src="https://www.explosm.net/another/relative/link.jpg">' . @@ -230,7 +230,7 @@ class XPathArticleEnhancerTest extends \PHPUnit_Framework_TestCase { $this->assertEquals( '<div>' . '<img src="http://www.url.com/absolute/url.png">' . - '<a target="_blank" href="mailto:test@testsite.com">mail</a>' . + '<a target="_blank" rel="noreferrer" href="mailto:test@testsite.com">mail</a>' . '</div>', $result->getBody() ); diff --git a/tests/unit/db/ItemTest.php b/tests/unit/db/ItemTest.php index 4ced884c8..c937053d1 100644 --- a/tests/unit/db/ItemTest.php +++ b/tests/unit/db/ItemTest.php @@ -264,7 +264,7 @@ class ItemTest extends \PHPUnit_Framework_TestCase { public function testMakeLinksInBodyOpenNewTab() { $item = new Item(); $item->setBody("<a href=\"test\">ha</a>"); - $this->assertEquals("<a target=\"_blank\" href=\"test\">ha</a>", + $this->assertEquals("<a target=\"_blank\" rel=\"noreferrer\" href=\"test\">ha</a>", $item->getBody()); } |