+ $this->assertSame('http://1.1.1.1', $entry->getUrl());
+ $this->assertSame('this is my title', $entry->getTitle());
+ $this->assertContains('this is my content', $entry->getContent());
+ $this->assertNull($entry->getPreviewPicture());
+ $this->assertSame('text/html', $entry->getMimetype());
+ $this->assertSame('fr', $entry->getLanguage());
+ $this->assertSame('200', $entry->getHttpStatus());
+ $this->assertSame(4.0, $entry->getReadingTime());
+ $this->assertSame('1.1.1.1', $entry->getDomainName());
+ }
+
+ public function testWithForcedContent()
+ {
+ $tagger = $this->getTaggerMock();
+ $tagger->expects($this->once())
+ ->method('tag');
+
+ $proxy = new ContentProxy((new Graby()), $tagger, $this->getValidator(), $this->getLogger(), $this->fetchingErrorMessage, true);
+ $entry = new Entry(new User());
+ $proxy->updateEntry(
+ $entry,
+ 'http://0.0.0.0',
+ [
+ 'html' => str_repeat('this is my content', 325),
+ 'title' => 'this is my title',
+ 'url' => 'http://1.1.1.1',
+ 'content_type' => 'text/html',
+ 'language' => 'fr',
+ 'date' => '1395635872',
+ 'authors' => ['Jeremy', 'Nico', 'Thomas'],
+ 'all_headers' => [
+ 'Cache-Control' => 'no-cache',
+ ],
+ ]
+ );