diff options
author | Kevin Decherf <kevin@kdecherf.com> | 2018-10-22 23:39:31 +0200 |
---|---|---|
committer | Kevin Decherf <kevin@kdecherf.com> | 2018-10-22 23:42:09 +0200 |
commit | b49c87acf12f22e38db751fb35be5da2436abc45 (patch) | |
tree | 6b4abfd62e3b54cbe289ccb79891e14bf1fe80bf /tests/Wallabag | |
parent | fc040c749dec0275e562182562c1c1cb89e6cfa1 (diff) | |
download | wallabag-b49c87acf12f22e38db751fb35be5da2436abc45.tar.gz wallabag-b49c87acf12f22e38db751fb35be5da2436abc45.tar.zst wallabag-b49c87acf12f22e38db751fb35be5da2436abc45.zip |
ignoreOriginUrl: add initial support of ignore lists
Add the ability to specify hosts and patterns lists to ignore the given
entry url and replace it with the fetched content url without touching
to origin_url.
This initial support should be reworked in the following months to move
the hardcoded ignore lists in the database.
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'tests/Wallabag')
-rw-r--r-- | tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php index 3debc457..a60aec5b 100644 --- a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php +++ b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php | |||
@@ -808,7 +808,39 @@ class ContentProxyTest extends TestCase | |||
808 | 'https://example.org/hello', | 808 | 'https://example.org/hello', |
809 | null, | 809 | null, |
810 | 'example.org', | 810 | 'example.org', |
811 | ] | 811 | ], |
812 | 'different path and query string in fetch content' => [ | ||
813 | 'https://example.org/hello', | ||
814 | null, | ||
815 | 'https://example.org/world?foo', | ||
816 | 'https://example.org/world?foo', | ||
817 | 'https://example.org/hello', | ||
818 | 'example.org', | ||
819 | ], | ||
820 | 'feedproxy ignore list test' => [ | ||
821 | 'http://feedproxy.google.com/~r/Wallabag/~3/helloworld', | ||
822 | null, | ||
823 | 'https://example.org/hello-wallabag', | ||
824 | 'https://example.org/hello-wallabag', | ||
825 | null, | ||
826 | 'example.org', | ||
827 | ], | ||
828 | 'feedproxy ignore list test with origin url already set' => [ | ||
829 | 'http://feedproxy.google.com/~r/Wallabag/~3/helloworld', | ||
830 | 'https://example.org/this-is-source', | ||
831 | 'https://example.org/hello-wallabag', | ||
832 | 'https://example.org/hello-wallabag', | ||
833 | 'https://example.org/this-is-source', | ||
834 | 'example.org', | ||
835 | ], | ||
836 | 'lemonde ignore pattern test' => [ | ||
837 | 'http://www.lemonde.fr/tiny/url', | ||
838 | null, | ||
839 | 'http://example.com/hello-world', | ||
840 | 'http://example.com/hello-world', | ||
841 | null, | ||
842 | 'example.com', | ||
843 | ], | ||
812 | ]; | 844 | ]; |
813 | } | 845 | } |
814 | 846 | ||