From: Jeremy Benoist Date: Sat, 1 Oct 2016 23:34:52 +0000 (+0200) Subject: Remove additional entry X-Git-Tag: 2.1.0~9^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=d6d3fb6e4c92ec8d71b3f8c6d91e0f8ab80f795b;hp=19ca0b2f355a657dd296bfa782473ffd45280572;p=github%2Fwallabag%2Fwallabag.git Remove additional entry After the test is done, cleanup what we’ve done --- 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(); } /**