Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
56 | public function assertContainsOnlyAllowedMembersThrowsException() |
||
57 | { |
||
58 | $allowed = ['anything', 'something']; |
||
59 | $json = [ |
||
60 | 'anything' => 'ok', |
||
61 | 'notAllowed' => 'bad' |
||
62 | ]; |
||
63 | |||
64 | $constraint = new ContainsOnlyAllowedMembersConstraint($allowed); |
||
65 | |||
66 | $this->setFailure( |
||
67 | sprintf( |
||
68 | '/Failed asserting that [\S\s]* %s\./', |
||
69 | $constraint->toString() |
||
70 | ) |
||
71 | ); |
||
72 | |||
73 | $constraint->evaluate($json); |
||
74 | } |
||
76 |