aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php
index 3f3c60d0..84b38f02 100644
--- a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php
+++ b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php
@@ -775,6 +775,32 @@ class ContentProxyTest extends TestCase
775 return $string; 775 return $string;
776 } 776 }
777 777
778 public function testWithChangedUrl()
779 {
780 $tagger = $this->getTaggerMock();
781 $tagger->expects($this->once())
782 ->method('tag');
783
784 $proxy = new ContentProxy((new Graby()), $tagger, $this->getValidator(), $this->getLogger(), $this->fetchingErrorMessage, true);
785 $entry = new Entry(new User());
786 $proxy->updateEntry(
787 $entry,
788 'http://0.0.0.0',
789 [
790 'html' => false,
791 'title' => '',
792 'url' => 'http://1.1.1.1',
793 'content_type' => '',
794 'language' => '',
795 ],
796 true
797 );
798
799 $this->assertSame('http://1.1.1.1', $entry->getUrl());
800 $this->assertSame('1.1.1.1', $entry->getDomainName());
801 $this->assertSame('http://0.0.0.0', $entry->getOriginUrl());
802 }
803
778 private function getTaggerMock() 804 private function getTaggerMock()
779 { 805 {
780 return $this->getMockBuilder(RuleBasedTagger::class) 806 return $this->getMockBuilder(RuleBasedTagger::class)