mirror of
https://github.com/wallabag/wallabag.git
synced 2024-12-16 10:22:14 +01:00
Fix tests
This commit is contained in:
parent
5c4993832e
commit
10d071a4f2
@ -202,10 +202,29 @@ class RuleBasedTaggerTest extends TestCase
|
||||
->method('satisfies')
|
||||
->willReturn(true);
|
||||
|
||||
$this->rulerz
|
||||
->method('filter')
|
||||
$query = $this->getMockBuilder('Doctrine\ORM\AbstractQuery')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
$query
|
||||
->expects($this->once())
|
||||
->method('getResult')
|
||||
->willReturn([new Entry($user), new Entry($user)]);
|
||||
|
||||
$qb = $this->getMockBuilder('Doctrine\ORM\QueryBuilder')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
||||
$qb
|
||||
->expects($this->once())
|
||||
->method('getQuery')
|
||||
->willReturn($query);
|
||||
|
||||
$this->entryRepository
|
||||
->expects($this->once())
|
||||
->method('getBuilderForAllByUser')
|
||||
->willReturn($qb);
|
||||
|
||||
$entries = $this->tagger->tagAllForUser($user);
|
||||
|
||||
$this->assertCount(2, $entries);
|
||||
@ -222,6 +241,7 @@ class RuleBasedTaggerTest extends TestCase
|
||||
{
|
||||
$user = new User();
|
||||
$config = new Config($user);
|
||||
$config->setReadingSpeed(200);
|
||||
|
||||
$user->setConfig($config);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user