X-Git-Url: https://git.immae.eu/?p=github%2Fwallabag%2Fwallabag.git;a=blobdiff_plain;f=tests%2FWallabag%2FApiBundle%2FController%2FTagRestControllerTest.php;h=9daa94cd5346bf0a99d8cc73e0366666d830f749;hp=8f1e6f02a674431cd992a7ad25c8a1a7d5706b47;hb=6c40d7fc85b98e335adf765d1c6b4465647da62c;hpb=2a0e0a47d853937702d235bdb91df0ca0e3116b6 diff --git a/tests/Wallabag/ApiBundle/Controller/TagRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/TagRestControllerTest.php index 8f1e6f02..9daa94cd 100644 --- a/tests/Wallabag/ApiBundle/Controller/TagRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/TagRestControllerTest.php @@ -32,12 +32,22 @@ class TagRestControllerTest extends WallabagApiTestCase public function testDeleteUserTag() { + $em = $this->client->getContainer()->get('doctrine.orm.entity_manager'); + $entry = $this->client->getContainer() + ->get('doctrine.orm.entity_manager') + ->getRepository('WallabagCoreBundle:Entry') + ->findOneWithTags($this->user->getId()); + + $entry = $entry[0]; + $tagLabel = 'tagtest'; $tag = new Tag(); $tag->setLabel($tagLabel); - - $em = $this->client->getContainer()->get('doctrine.orm.entity_manager'); $em->persist($tag); + + $entry->addTag($tag); + + $em->persist($entry); $em->flush(); $em->clear();