+
+ public function testToggleArchive()
+ {
+ $this->logInAs('admin');
+ $client = $this->getClient();
+
+ $content = $client->getContainer()
+ ->get('doctrine.orm.entity_manager')
+ ->getRepository('WallabagCoreBundle:Entry')
+ ->findOneByIsArchived(false);
+
+ $client->request('GET', '/archive/'.$content->getId());
+
+ $this->assertEquals(302, $client->getResponse()->getStatusCode());
+
+ $res = $client->getContainer()
+ ->get('doctrine.orm.entity_manager')
+ ->getRepository('WallabagCoreBundle:Entry')
+ ->findOneById($content->getId());
+
+ $this->assertEquals($res->isArchived(), true);
+ }
+
+ public function testToggleStar()
+ {
+ $this->logInAs('admin');
+ $client = $this->getClient();
+
+ $content = $client->getContainer()
+ ->get('doctrine.orm.entity_manager')
+ ->getRepository('WallabagCoreBundle:Entry')
+ ->findOneByIsStarred(false);
+
+ $client->request('GET', '/star/'.$content->getId());
+
+ $this->assertEquals(302, $client->getResponse()->getStatusCode());
+
+ $res = $client->getContainer()
+ ->get('doctrine.orm.entity_manager')
+ ->getRepository('WallabagCoreBundle:Entry')
+ ->findOneById($content->getId());
+
+ $this->assertEquals($res->isStarred(), true);
+ }
+
+ public function testDelete()
+ {
+ $this->logInAs('admin');
+ $client = $this->getClient();
+
+ $content = $client->getContainer()
+ ->get('doctrine.orm.entity_manager')
+ ->getRepository('WallabagCoreBundle:Entry')
+ ->findOneByIsDeleted(false);
+
+ $client->request('GET', '/delete/'.$content->getId());
+
+ $this->assertEquals(302, $client->getResponse()->getStatusCode());
+
+ $res = $client->getContainer()
+ ->get('doctrine.orm.entity_manager')
+ ->getRepository('WallabagCoreBundle:Entry')
+ ->findOneById($content->getId());
+
+ $this->assertEquals($res->isDeleted(), true);
+ }