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

Merge branch '2.6'

This commit is contained in:
Yassine Guedidi 2025-04-10 01:29:49 +02:00
commit e6ce9c524c
28 changed files with 611 additions and 280 deletions

View file

@ -128,8 +128,8 @@ class TagControllerTest extends WallabagTestCase
$crawler = $client->request('GET', '/view/' . $entry->getId());
$entryUri = $client->getRequest()->getRequestUri();
$link = $crawler->filter('a[href^="/remove-tag/' . $entry->getId() . '/' . $tag->getId() . '"]')->link();
$client->click($link);
$form = $crawler->filter('form[action^="/remove-tag/' . $entry->getId() . '/' . $tag->getId() . '"]')->form();
$client->submit($form);
$this->assertSame(302, $client->getResponse()->getStatusCode());
$this->assertSame($entryUri, $client->getResponse()->getTargetUrl());
@ -138,9 +138,8 @@ class TagControllerTest extends WallabagTestCase
$entry = $this->getEntityManager()->getRepository(Entry::class)->find($entry->getId());
$this->assertNotContains($this->tagName, $entry->getTagsLabel());
$client->request('GET', '/remove-tag/' . $entry->getId() . '/' . $tag->getId());
$this->assertSame(404, $client->getResponse()->getStatusCode());
$client->request('GET', '/view/' . $entry->getId());
$this->assertStringNotContainsString('/remove-tag/' . $entry->getId() . '/' . $tag->getId(), $client->getResponse()->getContent());
$tag = $client->getContainer()
->get(EntityManagerInterface::class)
@ -172,8 +171,8 @@ class TagControllerTest extends WallabagTestCase
$client = $this->getTestClient();
$crawler = $client->request('GET', '/tag/list');
$link = $crawler->filter('a[id="delete-' . $tag->getSlug() . '"]')->link();
$client->click($link);
$form = $crawler->filter('#tag-' . $tag->getId())->selectButton('delete')->form();
$client->submit($form);
$tag = $client->getContainer()
->get(EntityManagerInterface::class)
@ -556,7 +555,7 @@ class TagControllerTest extends WallabagTestCase
$crawler = $client->submit($form, $data);
$client->click($crawler->selectLink('entry.list.assign_search_tag')->link());
$client->submit($crawler->selectButton('entry.list.assign_search_tag')->form());
$client->followRedirect();
$entries = $client->getContainer()