diff --git a/composer.lock b/composer.lock index 9ff544365e..4d7328dea0 100644 --- a/composer.lock +++ b/composer.lock @@ -4567,16 +4567,16 @@ }, { "name": "j0k3r/graby-site-config", - "version": "1.0.187", + "version": "1.0.189", "source": { "type": "git", "url": "https://github.com/j0k3r/graby-site-config.git", - "reference": "4bcb5a7fac83b7276a0fade2daf388747404d66f" + "reference": "4c4721be3e7b8830dd6881ff80e149fb14a19bb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/j0k3r/graby-site-config/zipball/4bcb5a7fac83b7276a0fade2daf388747404d66f", - "reference": "4bcb5a7fac83b7276a0fade2daf388747404d66f", + "url": "https://api.github.com/repos/j0k3r/graby-site-config/zipball/4c4721be3e7b8830dd6881ff80e149fb14a19bb8", + "reference": "4c4721be3e7b8830dd6881ff80e149fb14a19bb8", "shasum": "" }, "require": { @@ -4605,9 +4605,9 @@ "description": "Graby site config files", "support": { "issues": "https://github.com/j0k3r/graby-site-config/issues", - "source": "https://github.com/j0k3r/graby-site-config/tree/1.0.187" + "source": "https://github.com/j0k3r/graby-site-config/tree/1.0.189" }, - "time": "2024-05-27T07:27:31+00:00" + "time": "2024-07-01T02:17:59+00:00" }, { "name": "j0k3r/httplug-ssrf-plugin", diff --git a/tests/Controller/Api/EntryRestControllerTest.php b/tests/Controller/Api/EntryRestControllerTest.php index b5011f6376..25ffe612be 100644 --- a/tests/Controller/Api/EntryRestControllerTest.php +++ b/tests/Controller/Api/EntryRestControllerTest.php @@ -559,7 +559,7 @@ public function testDeleteEntryExpectBadRequest() public function testPostEntry() { $this->client->request('POST', '/api/entries.json', [ - 'url' => 'https://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html', + 'url' => 'https://www.20minutes.fr/sport/jo_2024/4095122-20240712-jo-paris-2024-saut-ange-bombe-comment-anne-hidalgo-va-plonger-seine-si-fait-vraiment', 'tags' => 'google', 'title' => 'New title for my article', 'content' => 'my content', @@ -574,7 +574,7 @@ public function testPostEntry() $content = json_decode($this->client->getResponse()->getContent(), true); $this->assertGreaterThan(0, $content['id']); - $this->assertSame('https://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html', $content['url']); + $this->assertSame('https://www.20minutes.fr/sport/jo_2024/4095122-20240712-jo-paris-2024-saut-ange-bombe-comment-anne-hidalgo-va-plonger-seine-si-fait-vraiment', $content['url']); $this->assertSame(0, $content['is_archived']); $this->assertSame(0, $content['is_starred']); $this->assertNull($content['starred_at']); @@ -596,7 +596,7 @@ public function testPostSameEntry() { $em = $this->client->getContainer()->get(EntityManagerInterface::class); $entry = new Entry($em->getReference(User::class, $this->getUserId())); - $entry->setUrl('https://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html'); + $entry->setUrl('https://www.20minutes.fr/sport/jo_2024/4095122-20240712-jo-paris-2024-saut-ange-bombe-comment-anne-hidalgo-va-plonger-seine-si-fait-vraiment'); $entry->setArchived(true); $entry->addTag((new Tag())->setLabel('google')); $entry->addTag((new Tag())->setLabel('apple')); @@ -605,7 +605,7 @@ public function testPostSameEntry() $em->clear(); $this->client->request('POST', '/api/entries.json', [ - 'url' => 'https://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html', + 'url' => 'https://www.20minutes.fr/sport/jo_2024/4095122-20240712-jo-paris-2024-saut-ange-bombe-comment-anne-hidalgo-va-plonger-seine-si-fait-vraiment', 'archive' => '1', 'tags' => 'google, apple', ]); @@ -615,7 +615,7 @@ public function testPostSameEntry() $content = json_decode($this->client->getResponse()->getContent(), true); $this->assertGreaterThan(0, $content['id']); - $this->assertSame('https://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html', $content['url']); + $this->assertSame('https://www.20minutes.fr/sport/jo_2024/4095122-20240712-jo-paris-2024-saut-ange-bombe-comment-anne-hidalgo-va-plonger-seine-si-fait-vraiment', $content['url']); $this->assertSame(1, $content['is_archived']); $this->assertSame(0, $content['is_starred']); $this->assertCount(3, $content['tags']); @@ -699,7 +699,7 @@ public function testPostArchivedAndStarredEntryWithoutQuotes() public function testPostEntryWithOriginUrl() { $this->client->request('POST', '/api/entries.json', [ - 'url' => 'https://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html', + 'url' => 'https://www.20minutes.fr/sport/jo_2024/4095122-20240712-jo-paris-2024-saut-ange-bombe-comment-anne-hidalgo-va-plonger-seine-si-fait-vraiment', 'tags' => 'google', 'title' => 'New title for my article', 'content' => 'my content', @@ -715,7 +715,7 @@ public function testPostEntryWithOriginUrl() $content = json_decode($this->client->getResponse()->getContent(), true); $this->assertGreaterThan(0, $content['id']); - $this->assertSame('https://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html', $content['url']); + $this->assertSame('https://www.20minutes.fr/sport/jo_2024/4095122-20240712-jo-paris-2024-saut-ange-bombe-comment-anne-hidalgo-va-plonger-seine-si-fait-vraiment', $content['url']); $this->assertSame('http://mysource.tld', $content['origin_url']); } @@ -1223,7 +1223,7 @@ public function testReloadEntryErrorWhileFetching() public function testReloadEntry() { $this->client->request('POST', '/api/entries.json', [ - 'url' => 'https://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html', + 'url' => 'https://www.20minutes.fr/sport/jo_2024/4095122-20240712-jo-paris-2024-saut-ange-bombe-comment-anne-hidalgo-va-plonger-seine-si-fait-vraiment', 'archive' => '1', 'tags' => 'google, apple', ]); diff --git a/tests/Controller/EntryControllerTest.php b/tests/Controller/EntryControllerTest.php index a09f8bf518..86d74a1d7c 100644 --- a/tests/Controller/EntryControllerTest.php +++ b/tests/Controller/EntryControllerTest.php @@ -17,9 +17,9 @@ class EntryControllerTest extends WallabagTestCase { - public const AN_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE = 'https://www.lemonde.fr/judo/article/2017/11/11/judo-la-decima-de-teddy-riner_5213605_1556020.html'; + public const AN_URL_CONTAINING_AN_ARTICLE_WITH_IMAGE = 'https://www.20minutes.fr/sport/jo_2024/4095122-20240712-jo-paris-2024-saut-ange-bombe-comment-anne-hidalgo-va-plonger-seine-si-fait-vraiment'; public $downloadImagesEnabled = false; - public $url = 'https://www.lemonde.fr/pixels/article/2019/06/18/ce-qu-il-faut-savoir-sur-le-libra-la-cryptomonnaie-de-facebook_5477887_4408996.html'; + public $url = 'https://www.20minutes.fr/sport/jo_2024/4095122-20240712-jo-paris-2024-saut-ange-bombe-comment-anne-hidalgo-va-plonger-seine-si-fait-vraiment'; private $entryDataTestAttribute = '[data-test="entry"]'; /** @@ -175,9 +175,9 @@ public function testPostNewOk() $this->assertInstanceOf(Entry::class, $content); $this->assertSame($this->url, $content->getUrl()); - $this->assertStringContainsString('la cryptomonnaie de Facebook', $content->getTitle()); + $this->assertStringContainsString('Comment Hidalgo', $content->getTitle()); $this->assertSame('fr', $content->getLanguage()); - $this->assertArrayHasKey('x-frame-options', $content->getHeaders()); + $this->assertArrayHasKey('cache-control', $content->getHeaders()); $client->getContainer()->get(Config::class)->set('store_article_headers', 0); } @@ -1246,7 +1246,7 @@ public function testNewEntryWithDownloadImagesEnabled() $this->assertInstanceOf(Entry::class, $entry); $this->assertSame($url, $entry->getUrl()); - $this->assertStringContainsString('Judo', $entry->getTitle()); + $this->assertStringContainsString('Comment Hidalgo', $entry->getTitle()); // instead of checking for the filename (which might change) check that the image is now local $this->assertStringContainsString(rtrim($client->getContainer()->getParameter('domain_name'), '/') . '/assets/images/', $entry->getContent()); diff --git a/tests/Controller/Import/FirefoxControllerTest.php b/tests/Controller/Import/FirefoxControllerTest.php index 0c9827a187..c285018d77 100644 --- a/tests/Controller/Import/FirefoxControllerTest.php +++ b/tests/Controller/Import/FirefoxControllerTest.php @@ -127,23 +127,6 @@ public function testImportWallabagWithFirefoxFile() $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for 20minutes.fr is ok'); $this->assertNotEmpty($content->getLanguage(), 'Language for 20minutes.fr is ok'); $this->assertCount(3, $content->getTags()); - - $content = $client->getContainer() - ->get(EntityManagerInterface::class) - ->getRepository(Entry::class) - ->findByUrlAndUserId( - 'https://www.lemonde.fr/disparitions/article/2018/07/05/le-journaliste-et-cineaste-claude-lanzmann-est-mort_5326313_3382.html', - $this->getLoggedInUserId() - ); - - $this->assertInstanceOf(Entry::class, $content); - $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://www.lemonde.fr is ok'); - $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.lemonde.fr is ok'); - $this->assertNotEmpty($content->getLanguage(), 'Language for https://www.lemonde.fr is ok'); - - $createdAt = $content->getCreatedAt(); - $this->assertSame('2013', $createdAt->format('Y')); - $this->assertSame('12', $createdAt->format('m')); } public function testImportWallabagWithEmptyFile() diff --git a/tests/Controller/Import/PocketHtmlControllerTest.php b/tests/Controller/Import/PocketHtmlControllerTest.php index b4b7172c7b..ed5e86d96a 100644 --- a/tests/Controller/Import/PocketHtmlControllerTest.php +++ b/tests/Controller/Import/PocketHtmlControllerTest.php @@ -127,19 +127,6 @@ public function testImportWallabagWithPocketHtmlFile() $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for 20minutes.fr is ok'); $this->assertNotEmpty($content->getLanguage(), 'Language for 20minutes.fr is ok'); $this->assertCount(3, $content->getTags()); - - $content = $client->getContainer() - ->get(EntityManagerInterface::class) - ->getRepository(Entry::class) - ->findByUrlAndUserId( - 'https://www.lemonde.fr/disparitions/article/2018/07/05/le-journaliste-et-cineaste-claude-lanzmann-est-mort_5326313_3382.html', - $this->getLoggedInUserId() - ); - - $this->assertInstanceOf(Entry::class, $content); - $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://www.lemonde.fr is ok'); - $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.lemonde.fr is ok'); - $this->assertNotEmpty($content->getLanguage(), 'Language for https://www.lemonde.fr is ok'); } public function testImportWallabagWithEmptyFile() diff --git a/tests/Controller/Import/ShaarliControllerTest.php b/tests/Controller/Import/ShaarliControllerTest.php index 3898040ebd..2be30f9f84 100644 --- a/tests/Controller/Import/ShaarliControllerTest.php +++ b/tests/Controller/Import/ShaarliControllerTest.php @@ -127,19 +127,6 @@ public function testImportWallabagWithShaarliFile() $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for 20minutes.fr is ok'); $this->assertNotEmpty($content->getLanguage(), 'Language for 20minutes.fr is ok'); $this->assertCount(2, $content->getTags()); - - $content = $client->getContainer() - ->get(EntityManagerInterface::class) - ->getRepository(Entry::class) - ->findByUrlAndUserId( - 'https://www.lemonde.fr/disparitions/article/2018/07/05/le-journaliste-et-cineaste-claude-lanzmann-est-mort_5326313_3382.html', - $this->getLoggedInUserId() - ); - - $this->assertInstanceOf(Entry::class, $content); - $this->assertNotEmpty($content->getMimetype(), 'Mimetype for https://www.lemonde.fr is ok'); - $this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for https://www.lemonde.fr is ok'); - $this->assertNotEmpty($content->getLanguage(), 'Language for https://www.lemonde.fr is ok'); } public function testImportWallabagWithEmptyFile() diff --git a/tests/fixtures/Import/firefox-bookmarks.json b/tests/fixtures/Import/firefox-bookmarks.json index 2491ea9781..49fed169af 100644 --- a/tests/fixtures/Import/firefox-bookmarks.json +++ b/tests/fixtures/Import/firefox-bookmarks.json @@ -39,13 +39,13 @@ }, { "guid": "E385l9vZ_LVn", - "title": "Le journaliste et cinéaste Claude Lanzmann est mort", + "title": "JO Paris 2024 : Où courir dans la capitale maintenant que les quais sont fermés ?", "index": 1, "dateAdded": 1388166091544000, "lastModified": 1388166091545000, "id": 5, "type": "text/x-moz-place", - "uri": "https://www.lemonde.fr/disparitions/article/2018/07/05/le-journaliste-et-cineaste-claude-lanzmann-est-mort_5326313_3382.html" + "uri": "https://www.20minutes.fr/paris/4100740-20240715-jo-paris-2024-courir-capitale-maintenant-quais-fermes" } ] }, diff --git a/tests/fixtures/Import/ril_export.html b/tests/fixtures/Import/ril_export.html index 310c092dce..3a25056e9d 100644 --- a/tests/fixtures/Import/ril_export.html +++ b/tests/fixtures/Import/ril_export.html @@ -9,7 +9,7 @@

Unread

diff --git a/tests/fixtures/Import/shaarli-bookmarks.html b/tests/fixtures/Import/shaarli-bookmarks.html index ad401ea74f..dd707c9393 100644 --- a/tests/fixtures/Import/shaarli-bookmarks.html +++ b/tests/fixtures/Import/shaarli-bookmarks.html @@ -8,6 +8,6 @@

Shaarli export of all bookmarks on Mon, 17 Jul 23 14:31:25 +0200

The Legacy of Firefox OS. In the two years or so since Mozilla… | by Ben Francis | Medium
In the two years or so since Mozilla announced the end of Firefox OS as a Mozilla-run project, the B2G source code has found its way into a surprising number of commercial products. -
Template Filters — Eleventy +
Template Filters — Eleventy