Total Complexity | 3 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
14 | class UserQueryTest extends TestCase |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * There should be four filter calls for three passed names, since the DVR user is added transparently |
||
19 | */ |
||
20 | public function testFilterIgnoredUsers() |
||
21 | { |
||
22 | $mock = $this->getMockedUserQuery(); |
||
23 | $mock->expects($this->exactly(4)) |
||
|
|||
24 | ->method('filterByName'); |
||
25 | |||
26 | $ignoredUsers = [ |
||
27 | 'foo', |
||
28 | 'bar', |
||
29 | 'baz', |
||
30 | ]; |
||
31 | |||
32 | $mock->filterIgnoredUsers($ignoredUsers); |
||
33 | } |
||
34 | |||
35 | |||
36 | /** |
||
37 | * When no ignored users are specified, only the DVR user should be added |
||
38 | */ |
||
39 | public function testFilterIgnoredUsersNone() |
||
46 | } |
||
47 | |||
48 | |||
49 | /** |
||
50 | * @return \PHPUnit_Framework_MockObject_MockObject|UserQuery |
||
51 | */ |
||
52 | private function getMockedUserQuery() |
||
60 |