mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-26 19:11:07 +00:00
Add some tests about readingTime
This commit is contained in:
parent
2c00dddf01
commit
95859e54c5
1 changed files with 36 additions and 0 deletions
|
@ -499,6 +499,42 @@ class EntryControllerTest extends WallabagCoreTestCase
|
||||||
$this->assertCount(1, $crawler->filter('div[class=entry]'));
|
$this->assertCount(1, $crawler->filter('div[class=entry]'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testFilterOnReadingTimeOnlyUpper()
|
||||||
|
{
|
||||||
|
$this->logInAs('admin');
|
||||||
|
$client = $this->getClient();
|
||||||
|
|
||||||
|
$crawler = $client->request('GET', '/unread/list');
|
||||||
|
|
||||||
|
$form = $crawler->filter('button[id=submit-filter]')->form();
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'entry_filter[readingTime][right_number]' => 22,
|
||||||
|
];
|
||||||
|
|
||||||
|
$crawler = $client->submit($form, $data);
|
||||||
|
|
||||||
|
$this->assertCount(2, $crawler->filter('div[class=entry]'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testFilterOnReadingTimeOnlyLower()
|
||||||
|
{
|
||||||
|
$this->logInAs('admin');
|
||||||
|
$client = $this->getClient();
|
||||||
|
|
||||||
|
$crawler = $client->request('GET', '/unread/list');
|
||||||
|
|
||||||
|
$form = $crawler->filter('button[id=submit-filter]')->form();
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'entry_filter[readingTime][left_number]' => 22,
|
||||||
|
];
|
||||||
|
|
||||||
|
$crawler = $client->submit($form, $data);
|
||||||
|
|
||||||
|
$this->assertCount(4, $crawler->filter('div[class=entry]'));
|
||||||
|
}
|
||||||
|
|
||||||
public function testFilterOnUnreadStatus()
|
public function testFilterOnUnreadStatus()
|
||||||
{
|
{
|
||||||
$this->logInAs('admin');
|
$this->logInAs('admin');
|
||||||
|
|
Loading…
Reference in a new issue