aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tests/Wallabag/ApiBundle/Controller/TagRestControllerTest.php14
1 files changed, 12 insertions, 2 deletions
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
32 32
33 public function testDeleteUserTag() 33 public function testDeleteUserTag()
34 { 34 {
35 $em = $this->client->getContainer()->get('doctrine.orm.entity_manager');
36 $entry = $this->client->getContainer()
37 ->get('doctrine.orm.entity_manager')
38 ->getRepository('WallabagCoreBundle:Entry')
39 ->findOneWithTags($this->user->getId());
40
41 $entry = $entry[0];
42
35 $tagLabel = 'tagtest'; 43 $tagLabel = 'tagtest';
36 $tag = new Tag(); 44 $tag = new Tag();
37 $tag->setLabel($tagLabel); 45 $tag->setLabel($tagLabel);
38
39 $em = $this->client->getContainer()->get('doctrine.orm.entity_manager');
40 $em->persist($tag); 46 $em->persist($tag);
47
48 $entry->addTag($tag);
49
50 $em->persist($entry);
41 $em->flush(); 51 $em->flush();
42 $em->clear(); 52 $em->clear();
43 53