From d6d3fb6e4c92ec8d71b3f8c6d91e0f8ab80f795b Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 2 Oct 2016 01:34:52 +0200 Subject: [PATCH] Remove additional entry MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit After the test is done, cleanup what we’ve done --- .../CoreBundle/Controller/EntryControllerTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php index ebcf3f5a..9942b2a0 100644 --- a/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php +++ b/tests/Wallabag/CoreBundle/Controller/EntryControllerTest.php @@ -193,6 +193,15 @@ class EntryControllerTest extends WallabagCoreTestCase $this->assertEquals(302, $client->getResponse()->getStatusCode()); $this->assertContains('/view/', $client->getResponse()->getTargetUrl()); + + $em = $client->getContainer() + ->get('doctrine.orm.entity_manager'); + $entry = $em + ->getRepository('WallabagCoreBundle:Entry') + ->findOneByUrl(urldecode($url)); + + $em->remove($entry); + $em->flush(); } /** -- 2.41.0