mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-22 23:56:29 +00:00
Fix empty language and preview pics
This commit is contained in:
parent
977ac0a1d6
commit
41d45c6122
2 changed files with 5 additions and 5 deletions
|
@ -120,12 +120,12 @@ class ContentProxy
|
|||
|
||||
$this->validateAndSetLanguage(
|
||||
$entry,
|
||||
isset($content['language']) ? $content['language'] : ''
|
||||
isset($content['language']) ? $content['language'] : null
|
||||
);
|
||||
|
||||
$this->validateAndSetPreviewPicture(
|
||||
$entry,
|
||||
isset($content['open_graph']['og_image']) ? $content['open_graph']['og_image'] : ''
|
||||
isset($content['open_graph']['og_image']) ? $content['open_graph']['og_image'] : null
|
||||
);
|
||||
|
||||
// if content is an image, define it as a preview too
|
||||
|
|
|
@ -206,7 +206,7 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertEquals('http://1.1.1.1', $entry->getUrl());
|
||||
$this->assertEquals('this is my title', $entry->getTitle());
|
||||
$this->assertContains('this is my content', $entry->getContent());
|
||||
$this->assertEmpty($entry->getPreviewPicture());
|
||||
$this->assertNull($entry->getPreviewPicture());
|
||||
$this->assertEquals('text/html', $entry->getMimetype());
|
||||
$this->assertEquals('fr', $entry->getLanguage());
|
||||
$this->assertEquals('200', $entry->getHttpStatus());
|
||||
|
@ -252,7 +252,7 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertEquals('this is my title', $entry->getTitle());
|
||||
$this->assertContains('this is my content', $entry->getContent());
|
||||
$this->assertEquals('text/html', $entry->getMimetype());
|
||||
$this->assertEmpty($entry->getLanguage());
|
||||
$this->assertNull($entry->getLanguage());
|
||||
$this->assertEquals('200', $entry->getHttpStatus());
|
||||
$this->assertEquals(4.0, $entry->getReadingTime());
|
||||
$this->assertEquals('1.1.1.1', $entry->getDomainName());
|
||||
|
@ -300,7 +300,7 @@ class ContentProxyTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertEquals('http://1.1.1.1', $entry->getUrl());
|
||||
$this->assertEquals('this is my title', $entry->getTitle());
|
||||
$this->assertContains('this is my content', $entry->getContent());
|
||||
$this->assertEmpty($entry->getPreviewPicture());
|
||||
$this->assertNull($entry->getPreviewPicture());
|
||||
$this->assertEquals('text/html', $entry->getMimetype());
|
||||
$this->assertEquals('fr', $entry->getLanguage());
|
||||
$this->assertEquals('200', $entry->getHttpStatus());
|
||||
|
|
Loading…
Reference in a new issue