forked from wallabag/wallabag
@ -221,7 +221,7 @@ class EntryControllerTest extends WallabagTestCase
|
||||
*/
|
||||
public function testPostWithMultipleAuthors()
|
||||
{
|
||||
$url = 'https://www.liberation.fr/planete/2017/04/05/donald-trump-et-xi-jinping-tentative-de-flirt-en-floride_1560768';
|
||||
$url = 'https://www.theguardian.com/global-development/ng-interactive/2025/dec/22/childbirth-under-attack-how-women-and-babies-became-targets-in-conflicts-around-the-world';
|
||||
$this->logInAs('admin');
|
||||
$client = $this->getTestClient();
|
||||
|
||||
@ -245,11 +245,13 @@ class EntryControllerTest extends WallabagTestCase
|
||||
->findByUrlAndUserId($url, $this->getLoggedInUserId());
|
||||
|
||||
$this->assertInstanceOf(Entry::class, $content);
|
||||
$this->assertSame('2025-12-22', $content->getPublishedAt()->format('Y-m-d'));
|
||||
$this->assertSame('en', $content->getLanguage());
|
||||
$authors = $content->getPublishedBy();
|
||||
$this->assertSame('2017-04-05', $content->getPublishedAt()->format('Y-m-d'));
|
||||
$this->assertSame('fr', $content->getLanguage());
|
||||
$this->assertStringContainsString('Balenieri', $authors[0]);
|
||||
$this->assertStringContainsString('Autran', $authors[1]);
|
||||
$this->assertStringContainsString('Cookman', $authors[0]);
|
||||
$this->assertStringContainsString('Levitt', $authors[1]);
|
||||
$this->assertStringContainsString('Osman', $authors[2]);
|
||||
$this->assertStringContainsString('Salih', $authors[3]);
|
||||
}
|
||||
|
||||
public function testPostNewOkUrlExist()
|
||||
|
||||
@ -118,15 +118,15 @@ class InstapaperControllerTest extends WallabagTestCase
|
||||
->get(EntityManagerInterface::class)
|
||||
->getRepository(Entry::class)
|
||||
->findByUrlAndUserId(
|
||||
'https://www.liberation.fr/societe/police-justice/cours-dassises-on-efface-le-peuple-dun-processus-judiciaire-dont-il-est-pourtant-le-coeur-battant-20210414_FYUNIZENHRGHZLAZEKSMKZYEPI/',
|
||||
'https://www.theguardian.com/global-development/ng-interactive/2025/dec/22/childbirth-under-attack-how-women-and-babies-became-targets-in-conflicts-around-the-world',
|
||||
$this->getLoggedInUserId()
|
||||
);
|
||||
|
||||
$this->assertInstanceOf(Entry::class, $content);
|
||||
|
||||
$this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://www.liberation.fr is ok');
|
||||
$this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.liberation.fr is ok');
|
||||
$this->assertNotEmpty($content->getLanguage(), 'Language for https://www.liberation.fr is ok');
|
||||
$this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://www.theguardian.com is ok');
|
||||
$this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.theguardian.com is ok');
|
||||
$this->assertNotEmpty($content->getLanguage(), 'Language for https://www.theguardian.com is ok');
|
||||
$this->assertContains('foot', $content->getTagsLabel(), 'It includes the "foot" tag');
|
||||
$this->assertCount(1, $content->getTags());
|
||||
$this->assertInstanceOf(\DateTime::class, $content->getCreatedAt());
|
||||
|
||||
2
tests/fixtures/Import/instapaper-export.csv
vendored
2
tests/fixtures/Import/instapaper-export.csv
vendored
@ -1,5 +1,5 @@
|
||||
URL,Title,Selection,Folder
|
||||
https://www.liberation.fr/societe/police-justice/cours-dassises-on-efface-le-peuple-dun-processus-judiciaire-dont-il-est-pourtant-le-coeur-battant-20210414_FYUNIZENHRGHZLAZEKSMKZYEPI/,Cours d’assises : «On efface le peuple d’un processus judiciaire dont il est pourtant le cœur battant»,,Unread
|
||||
https://www.theguardian.com/global-development/ng-interactive/2025/dec/22/childbirth-under-attack-how-women-and-babies-became-targets-in-conflicts-around-the-world,Childbirth under attack: how women and babies became targets in conflicts around the world,,Unread
|
||||
https://redditblog.com/2016/09/20/amp-and-reactredux/,AMP and React+Redux: Why Not?,,Archive
|
||||
https://medium.com/@the_minh/why-foursquare-swarm-is-still-my-favourite-social-network-e38228493e6c,Why Foursquare / Swarm is still my favourite social network,,Starred
|
||||
https://www.20minutes.fr/high-tech/2077615-20170531-quoi-exactement-tweet-covfefe-donald-trump-persiste-signe,"Dis donc Donald Trump, c'est quoi exactement «covfefe»?",,test_tag
|
||||
|
||||
|
Reference in New Issue
Block a user