improve test and change method name. Also, display number of entries for each tag

This commit is contained in:
Thomas Citharel
2016-02-10 18:40:15 +01:00
parent 567421af50
commit e686a76d34
3 changed files with 5 additions and 3 deletions

View File

@ -81,12 +81,14 @@ class TagControllerTest extends WallabagCoreTestCase
$tag = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Tag')
->findOnebyEntryAndLabel($entry, $this->tagName);
->findOneByEntryAndTagLabel($entry, $this->tagName);
$client->request('GET', '/remove-tag/'.$entry->getId().'/'.$tag->getId());
$this->assertEquals(302, $client->getResponse()->getStatusCode());
$this->assertNotContains($this->tagName, $entry->getTags());
$client->request('GET', '/remove-tag/'.$entry->getId().'/'.$tag->getId());
$this->assertEquals(404, $client->getResponse()->getStatusCode());