We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
Conditions | 1 |
Paths | 1 |
Total Lines | 29 |
Code Lines | 15 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function testHasAnyPermission() |
||
16 | { |
||
17 | $object = new \stdClass(); |
||
18 | |||
19 | $this->assertExpressionCompile( |
||
20 | 'hasAnyPermission(object,["OWNER", "WRITER"])', |
||
21 | [ |
||
22 | $this->matchesRegularExpression('/^(OWNER|WRITER)$/'), |
||
23 | $this->identicalTo($object), |
||
24 | ], |
||
25 | [ |
||
26 | 'object' => $object, |
||
27 | ] |
||
28 | ); |
||
29 | |||
30 | $this->assertExpressionCompile( |
||
31 | 'hasAnyPermission(object,["OWNER", "WRITER"])', |
||
32 | [ |
||
33 | $this->matchesRegularExpression('/^(OWNER|WRITER)$/'), |
||
34 | $this->identicalTo($object), |
||
35 | ], |
||
36 | [ |
||
37 | 'object' => $object, |
||
38 | ], |
||
39 | $this->exactly(2), |
||
40 | false, |
||
41 | 'assertFalse' |
||
42 | ); |
||
43 | } |
||
44 | } |
||
45 |