X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FCoreBundle%2FHelper%2FContentProxyTest.php;h=3dd9273c825f082032d0c9933dbff0995866ee81;hb=60599679519e819301ce36185c3dd5ca7aa7f4ec;hp=c20732cc2480a07b52f80c6fbc799d0bc6b75f1a;hpb=e07fadea76aa7329c4b955a59e74cb867c733706;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php index c20732cc..3dd9273c 100644 --- a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php +++ b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php @@ -777,30 +777,62 @@ class ContentProxyTest extends TestCase null, 'example.com', ], - 'no query string in fetched content' => [ + 'query string in fetched content' => [ + 'https://example.org/hello', + null, + 'https://example.org/hello?world=1', 'https://example.org/hello?world=1', + 'https://example.org/hello', + 'example.org', + ], + 'fragment in fetched content' => [ + 'https://example.org/hello', null, + 'https://example.org/hello#world', 'https://example.org/hello', - 'https://example.org/hello?world=1', null, 'example.org', ], - 'query string in fetched content' => [ + 'fragment and query string in fetched content' => [ 'https://example.org/hello', null, - 'https://example.org/hello?world=1', + 'https://example.org/hello?foo#world', + 'https://example.org/hello?foo#world', 'https://example.org/hello', - null, 'example.org', ], - 'fragment in fetched content' => [ + 'different path and query string in fetch content' => [ 'https://example.org/hello', null, - 'https://example.org/hello#world', + 'https://example.org/world?foo', + 'https://example.org/world?foo', 'https://example.org/hello', + 'example.org', + ], + 'feedproxy ignore list test' => [ + 'http://feedproxy.google.com/~r/Wallabag/~3/helloworld', + null, + 'https://example.org/hello-wallabag', + 'https://example.org/hello-wallabag', null, 'example.org', ], + 'feedproxy ignore list test with origin url already set' => [ + 'http://feedproxy.google.com/~r/Wallabag/~3/helloworld', + 'https://example.org/this-is-source', + 'https://example.org/hello-wallabag', + 'https://example.org/hello-wallabag', + 'https://example.org/this-is-source', + 'example.org', + ], + 'lemonde ignore pattern test' => [ + 'http://www.lemonde.fr/tiny/url', + null, + 'http://example.com/hello-world', + 'http://example.com/hello-world', + null, + 'example.com', + ], ]; }