zendframework / zend-feed

Feed component from Zend Framework
BSD 3-Clause "New" or "Revised" License
166 stars 42 forks source link

Proper fix for protocol relative link absolutization #39

Closed Xerkus closed 7 years ago

Xerkus commented 7 years ago

Fixes #25 Proper fix for #2

Test before fix:

1) ZendTest\Feed\Reader\FeedSetTest::testAbsolutiseUri with data set "protocol-relative" ('//example.com/feed', 'https://example.org', 'https://example.com/feed')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'https://example.com/feed'
+'https://example.org/example.com/feed'

test/Reader/FeedSetTest.php:36

2) ZendTest\Feed\Reader\FeedSetTest::testAbsolutiseUri with data set "protocol-relative-default" ('//example.com/feed', '//example.org')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'http://example.com/feed'
+'http://example.org/example.com/feed'

test/Reader/FeedSetTest.php:36