Commit graph

23 commits

Author SHA1 Message Date
Jeremy Benoist 3c507d676f
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
2022-01-31 12:59:39 +01:00
Nicolas Lœuillet c34fe9945a Fixed test 2021-08-03 08:36:56 +02:00
Jeremy Benoist 732ec8a2eb
Fix deprecated method in tests 2020-06-15 14:21:35 +02:00
Kevin Decherf 48f9a9632d TagController: support merging labels when renaming one with label of another
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2020-04-18 18:12:33 +02:00
Kevin Decherf a19caf8a37 TagController: prevent tag deletion when renaming a tag with the same label
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2020-04-18 18:09:07 +02:00
Kevin Decherf 39133eb796 TagController: fix duplicated tags when renaming them
The fix relies on a workaround available on TagsAssigner, see the
AssignTagsToEntry() signature for detail.

I replaced the findOneByLabel in the corresponding test to assert that
there is no duplicate.

Fixes #4216

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2020-04-18 18:09:07 +02:00
Kevin Decherf feb239ea10 mysql: change collation of tag table
utf8mb4_unicode_ci considers that 'caché' is equal to 'cache' which
can lead to attaching incorrect tags to entries. This issue is due to
some unicode normalization done by MySQL.

utf8mb4_bin makes no unicode normalization, letting wallabag to consider
'cache' and 'caché' as two different tags.

We change the collation of the whole table as Doctrine does not support
setting a collation on a column for a specific platform (it tries to
apply utf8mb4_bin even for pgsql and sqlite).

Fixes #3302

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2019-05-19 23:37:49 +02:00
Stéphane HULARD 03b2058dbe
Add tests about the tag renaming process. 2018-09-25 10:18:36 +02:00
Kevin Decherf 2a1ceb67b4 php-cs-fixer
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2018-09-05 14:25:32 +02:00
Kevin Decherf 7036d91fe7 Tag: render tags case-insensitive by storing them in lowercase
Fixes #2502

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2017-08-27 16:51:23 +02:00
Jeremy Benoist f808b01692
Add a real configuration for CS-Fixer 2017-07-01 09:52:38 +02:00
Jeremy Benoist 6acadf8e98
Rewrote code & fix tests 2017-06-01 11:31:45 +02:00
adev 7ab5eb9508 Isolated tests
Use https://github.com/dmaicher/doctrine-test-bundle to have test isolation.
2017-05-31 16:03:54 +02:00
Jeremy Benoist 31485bddb9
Ensure retrieved data are fresh 2017-05-31 11:11:02 +02:00
Kevin Decherf 5dbf3f2326 TagController: ignore ActionMarkAsRead when removing tag from entry
Fixes #2835

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2017-05-31 00:36:46 +02:00
Nicolas Lœuillet fdd725f58c Added notmatches operator for tagging rule 2017-04-20 15:17:02 +02:00
Nicolas Lœuillet c8de7ab94c
Fixed export by tags with a tag which contains space 2016-12-27 21:26:53 +01:00
Jeremy Benoist ac8cf632bb
Ensure orphan tag are remove in API
When the association between a tag and an entry is removed, if the tag doesn’t have other entries, we can remove it.

Also add more tests for that part and ensure TagControllerTest is isolated from the rest of the test suite (finally!)
2016-10-07 23:31:53 +02:00
Jeremy Benoist 74e1f7433a
Fix tag test 2016-10-07 07:43:48 +02:00
Nicolas Lœuillet 084fb0d303 Some fixes about upgrade from 2.0.x -> 2.1.0 2016-09-28 10:04:36 +02:00
Nicolas Lœuillet 267e8d6361
Add tests for tag list routes 2016-08-23 07:26:18 +02:00
Jeremy Benoist fdc90ceb17 Change the way to login user in tests
Instead of using a HTTP request we just login user like FOSUser does.
It allows us to mock service in container for functional tests.

Also, fix a bad config name in fos_user for firewall

And finally, add functional test to PocketImport
2016-06-24 11:55:47 +02:00
Jeremy Benoist 23634d5d84 Jump to Symfony 3.1 2016-06-22 17:59:35 +02:00
Renamed from src/Wallabag/CoreBundle/Tests/Controller/TagControllerTest.php (Browse further)