Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
31 | public function testProperties($args) |
||
32 | { |
||
33 | $class = $this->getClass(); |
||
34 | $resource = new $class(); |
||
35 | |||
36 | foreach ($args as $arg) { |
||
37 | list ($method) = $arg; |
||
38 | |||
39 | try { |
||
40 | $resource->{$method}(); |
||
41 | } catch (TypeError $e) { |
||
42 | self::assertTrue(true); |
||
43 | continue; |
||
44 | } catch (Throwable $t) { |
||
45 | self::fail('Should have thrown a TypeError instead of a ' . get_class($t)); |
||
46 | } |
||
47 | } |
||
48 | } |
||
49 | } |
||
50 |