class EntryControllerTest extends WallabagCoreTestCase
{
+ public $url = 'http://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html';
+
public function testLogin()
{
$client = $this->getClient();
$form = $crawler->filter('button[type=submit]')->form();
$data = array(
- 'entry[url]' => 'http://www.lemonde.fr/pixels/article/2015/03/28/plongee-dans-l-univers-d-ingress-le-jeu-de-google-aux-frontieres-du-reel_4601155_4408996.html',
+ 'entry[url]' => $this->url,
);
$client->submit($form, $data);
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
- ->findOneByUsernameAndNotArchived('admin');
+ ->findOneByUrl($this->url);
$client->request('GET', '/view/'.$content->getId());
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
- ->findOneByUsernameAndNotArchived('admin');
+ ->findOneByUrl($this->url);
$crawler = $client->request('GET', '/edit/'.$content->getId());
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
- ->findOneByUsernameAndNotArchived('admin');
+ ->findOneByUrl($this->url);
$crawler = $client->request('GET', '/edit/'.$content->getId());
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
- ->findOneByUsernameAndNotArchived('admin');
+ ->findOneByUrl($this->url);
$client->request('GET', '/archive/'.$content->getId());
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
- ->findOneByUsernameAndNotStarred('admin');
+ ->findOneByUrl($this->url);
$client->request('GET', '/star/'.$content->getId());
$content = $client->getContainer()
->get('doctrine.orm.entity_manager')
->getRepository('WallabagCoreBundle:Entry')
- ->findOneByUsernameAndNotStarred('admin');
+ ->findOneByUrl($this->url);
$client->request('GET', '/delete/'.$content->getId());
$crawler = $client->request('GET', '/unread/list');
$form = $crawler->filter('button[id=submit-filter]')->form();
$data = array(
- 'entry_filter[domainName]' => 'monde',
+ 'entry_filter[domainName]' => 'domain',
);
$crawler = $client->submit($form, $data);
- $this->assertCount(1, $crawler->filter('div[class=entry]'));
+ $this->assertCount(5, $crawler->filter('div[class=entry]'));
$form = $crawler->filter('button[id=submit-filter]')->form();
$data = array(
$form['entry_filter[isStarred]']->tick();
$crawler = $client->submit($form);
- $this->assertCount(2, $crawler->filter('div[class=entry]'));
+ $this->assertCount(1, $crawler->filter('div[class=entry]'));
}
public function testPreviewPictureFilter()
);
$crawler = $client->submit($form, $data);
- $this->assertCount(3, $crawler->filter('div[class=entry]'));
+ $this->assertCount(2, $crawler->filter('div[class=entry]'));
$form = $crawler->filter('button[id=submit-filter]')->form();
$data = array(