Merge pull request #7582 from wallabag/fix/2.6-site-config

Update site config & tests
This commit is contained in:
Jérémy Benoist 2024-07-15 17:14:15 +02:00 committed by GitHub
commit b6faa844cb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 28 additions and 45 deletions

View file

@ -86,7 +86,7 @@
"kphoen/rulerz": "^0.21.1",
"kphoen/rulerz-bundle": "^0.15",
"laminas/laminas-code": "^4.7.1",
"lcobucci/jwt": "^4.3.0",
"lcobucci/jwt": "4.1.5",
"lexik/form-filter-bundle": "^7.0.3",
"mgargano/simplehtmldom": "^1.5",
"mnapoli/piwik-twig-extension": "^3.0",

38
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "c8e57d1a42415287fe16f3417d0c1b01",
"content-hash": "313f6b39034c27c58a102bfadb5ae30f",
"packages": [
{
"name": "babdev/pagerfanta-bundle",
@ -4605,16 +4605,16 @@
},
{
"name": "j0k3r/graby-site-config",
"version": "1.0.185",
"version": "1.0.189",
"source": {
"type": "git",
"url": "https://github.com/j0k3r/graby-site-config.git",
"reference": "c2fed027457913fe2e51b68283f1aca019524740"
"reference": "4c4721be3e7b8830dd6881ff80e149fb14a19bb8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/j0k3r/graby-site-config/zipball/c2fed027457913fe2e51b68283f1aca019524740",
"reference": "c2fed027457913fe2e51b68283f1aca019524740",
"url": "https://api.github.com/repos/j0k3r/graby-site-config/zipball/4c4721be3e7b8830dd6881ff80e149fb14a19bb8",
"reference": "4c4721be3e7b8830dd6881ff80e149fb14a19bb8",
"shasum": ""
},
"require": {
@ -4643,9 +4643,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.185"
"source": "https://github.com/j0k3r/graby-site-config/tree/1.0.189"
},
"time": "2024-04-01T02:12:50+00:00"
"time": "2024-07-01T02:17:59+00:00"
},
{
"name": "j0k3r/httplug-ssrf-plugin",
@ -5551,16 +5551,16 @@
},
{
"name": "lcobucci/jwt",
"version": "4.3.0",
"version": "4.1.5",
"source": {
"type": "git",
"url": "https://github.com/lcobucci/jwt.git",
"reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4"
"reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/lcobucci/jwt/zipball/4d7de2fe0d51a96418c0d04004986e410e87f6b4",
"reference": "4d7de2fe0d51a96418c0d04004986e410e87f6b4",
"url": "https://api.github.com/repos/lcobucci/jwt/zipball/fe2d89f2eaa7087af4aa166c6f480ef04e000582",
"reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582",
"shasum": ""
},
"require": {
@ -5569,19 +5569,19 @@
"ext-mbstring": "*",
"ext-openssl": "*",
"ext-sodium": "*",
"lcobucci/clock": "^2.0 || ^3.0",
"lcobucci/clock": "^2.0",
"php": "^7.4 || ^8.0"
},
"require-dev": {
"infection/infection": "^0.21",
"lcobucci/coding-standard": "^6.0",
"mikey179/vfsstream": "^1.6.7",
"phpbench/phpbench": "^1.2",
"phpbench/phpbench": "^1.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.4",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpstan/phpstan-strict-rules": "^1.0",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-deprecation-rules": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-strict-rules": "^0.12",
"phpunit/php-invoker": "^3.1",
"phpunit/phpunit": "^9.5"
},
@ -5609,7 +5609,7 @@
],
"support": {
"issues": "https://github.com/lcobucci/jwt/issues",
"source": "https://github.com/lcobucci/jwt/tree/4.3.0"
"source": "https://github.com/lcobucci/jwt/tree/4.1.5"
},
"funding": [
{
@ -5621,7 +5621,7 @@
"type": "patreon"
}
],
"time": "2023-01-02T13:28:00+00:00"
"time": "2021-09-28T19:34:56+00:00"
},
{
"name": "lexik/form-filter-bundle",

View file

@ -17,9 +17,9 @@ use Wallabag\UserBundle\Entity\User;
class EntryControllerTest extends WallabagCoreTestCase
{
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 @@ class EntryControllerTest extends WallabagCoreTestCase
$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);
}
@ -1218,7 +1218,7 @@ class EntryControllerTest extends WallabagCoreTestCase
$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());
@ -1499,7 +1499,7 @@ class EntryControllerTest extends WallabagCoreTestCase
'zh_CN',
],
'pt_BR' => [
'https://esportes.r7.com/lance/futebol/victor-hugo-e-matheus-franca-devem-desfalcar-flamengo-no-carioca-22112022',
'https://esportes.r7.com/lance/futebol/victor-hugo-e-matheus-franca-devem-desfalcar-flamengo-no-carioca-22112022/',
'pt_BR',
],
'es-ES' => [

View file

@ -127,23 +127,6 @@ class FirefoxControllerTest extends WallabagCoreTestCase
$this->assertNotEmpty($content->getPreviewPicture(), 'Preview picture for http://lexpansion.lexpress.fr is ok');
$this->assertNotEmpty($content->getLanguage(), 'Language for http://lexpansion.lexpress.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()

View file

@ -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"
}
]
},