$form = $crawler->filter('button[type=submit]')->form();
$data = array(
- 'entry[url]' => 'https://www.wallabag.org/blog/2016/01/08/wallabag-alpha1-v2',
+ 'entry[url]' => $this->url,
);
$client->submit($form, $data);
->get('doctrine.orm.entity_manager');
$entry = $em
->getRepository('WallabagCoreBundle:Entry')
- ->findOneByUrl($this->url);
+ ->findByUrlAndUserId($this->url, $this->getLoggedInUserId());
$em->remove($entry);
$em->flush();
}
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
- ->findOneByUrl($this->url);
+ ->findByUrlAndUserId($this->url, $this->getLoggedInUserId());
$client->request('GET', '/view/'.$content->getId());
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
- ->findOneByUrl($this->url);
+ ->findByUrlAndUserId($this->url, $this->getLoggedInUserId());
// empty content
$content->setContent('');
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
- ->findOneByUrl($this->url);
+ ->findByUrlAndUserId($this->url, $this->getLoggedInUserId());
$this->assertNotEmpty($content->getContent());
}
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
- ->findOneByUrl($this->url);
+ ->findByUrlAndUserId($this->url, $this->getLoggedInUserId());
$crawler = $client->request('GET', '/edit/'.$content->getId());
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
- ->findOneByUrl($this->url);
+ ->findByUrlAndUserId($this->url, $this->getLoggedInUserId());
$crawler = $client->request('GET', '/edit/'.$content->getId());
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
- ->findOneByUrl($this->url);
+ ->findByUrlAndUserId($this->url, $this->getLoggedInUserId());
$client->request('GET', '/archive/'.$content->getId());
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
- ->findOneByUrl($this->url);
+ ->findByUrlAndUserId($this->url, $this->getLoggedInUserId());
$client->request('GET', '/star/'.$content->getId());
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
- ->findOneByUrl($this->url);
+ ->findByUrlAndUserId($this->url, $this->getLoggedInUserId());
$client->request('GET', '/delete/'.$content->getId());