$client->followRedirect();
$this->assertEquals(200, $client->getResponse()->getStatusCode());
- $this->assertContains('We\'ll accompany you to visit wallabag', $client->getResponse()->getContent());
+ $this->assertContains('quickstart.intro.paragraph_1', $client->getResponse()->getContent());
// Test if quickstart is disabled when user has 1 entry
$crawler = $client->request('GET', '/new');
$this->assertEquals(200, $client->getResponse()->getStatusCode());
- $form = $crawler->filter('button[type=submit]')->form();
+ $form = $crawler->filter('form[name=entry]')->form();
$data = array(
'entry[url]' => $this->url,
$client->followRedirect();
$client->request('GET', '/unread/list');
- $this->assertContains('There is one entry.', $client->getResponse()->getContent());
+ $this->assertContains('entry.list.number_on_the_page', $client->getResponse()->getContent());
}
public function testGetNew()
$this->assertEquals(200, $client->getResponse()->getStatusCode());
$this->assertCount(1, $crawler->filter('input[type=url]'));
- $this->assertCount(1, $crawler->filter('button[type=submit]'));
+ $this->assertCount(1, $crawler->filter('form[name=entry]'));
}
public function testPostNewViaBookmarklet()
$this->assertEquals(200, $client->getResponse()->getStatusCode());
- $form = $crawler->filter('button[type=submit]')->form();
+ $form = $crawler->filter('form[name=entry]')->form();
$crawler = $client->submit($form);
$this->assertEquals(200, $client->getResponse()->getStatusCode());
- $form = $crawler->filter('button[type=submit]')->form();
+ $form = $crawler->filter('form[name=entry]')->form();
$data = array(
'entry[url]' => $this->url,
$this->assertEquals(200, $client->getResponse()->getStatusCode());
- $form = $crawler->filter('button[type=submit]')->form();
+ $form = $crawler->filter('form[name=entry]')->form();
$data = array(
'entry[url]' => $this->url,
$this->assertEquals(200, $client->getResponse()->getStatusCode());
- $form = $crawler->filter('button[type=submit]')->form();
+ $form = $crawler->filter('form[name=entry]')->form();
$data = array(
'entry[url]' => $url = 'https://github.com/wallabag/wallabag',
$this->assertEquals(200, $client->getResponse()->getStatusCode());
}
+ public function testRangeException()
+ {
+ $this->logInAs('admin');
+ $client = $this->getClient();
+
+ $client->request('GET', '/all/list/900');
+
+ $this->assertEquals(302, $client->getResponse()->getStatusCode());
+ $this->assertEquals('/all/list', $client->getResponse()->getTargetUrl());
+ }
+
/**
* @depends testPostNewOk
*/