1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Add build test on PHP 8.0 & 8.1

Add `isTransactional` to `WallabagMigration` because PHP 8 behave differently with PDO transaction.
This is a workaround because we can't upgrade Doctrine Migration for now (upper versions have the fix).

- Build is now using Composer v2 (instead of v1)
- All actions have been updated to latest version
- Fix bug in PHP 8 were `$entry->getTags()` can't be properly used as a _traversable_ by `assertContains` during tests. Added a custom method `Entry::getTagsLabel()` which return a flatted tag array with only label
- Replace `assertNotRegExp` by `assertDoesNotMatchRegularExpression` because it was deprecated
This commit is contained in:
Jeremy Benoist 2022-01-31 09:27:20 +01:00
parent 6aeaaaabdd
commit 3c507d676f
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
15 changed files with 48 additions and 23 deletions

View file

@ -124,7 +124,7 @@ class WallabagV1ControllerTest extends WallabagCoreTestCase
$this->assertSame($content->getPreviewPicture(), 'http://www.framablog.org/public/_img/framablog/wallaby_baby.jpg');
$this->assertEmpty($content->getLanguage(), 'Language for http://www.framablog.org is empty');
$tags = $content->getTags();
$tags = $content->getTagsLabel();
$this->assertContains('foot', $tags, 'It includes the "foot" tag');
$this->assertContains('framabag', $tags, 'It includes the "framabag" tag');
$this->assertCount(2, $tags);