| Conditions | 3 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 61 | public static function ConfigureFrameworkInstance( |
||
| 62 | TestCase $testCase, |
||
| 63 | Framework $instance, |
||
| 64 | array $postConstructionCalls |
||
| 65 | ) : void { |
||
| 66 | if (count($postConstructionCalls) > 0) { |
||
| 67 | $reflector = new ReflectionClass($instance); |
||
|
|
|||
| 68 | |||
| 69 | foreach (array_keys($postConstructionCalls) as $method) { |
||
| 70 | $testCase->assertTrue(method_exists($instance, $method), sprintf( |
||
| 71 | 'Argument %u passed to %s must contain keys referring to methods on %s', |
||
| 72 | 2, |
||
| 73 | __METHOD__, |
||
| 74 | get_class($instance) |
||
| 75 | )); |
||
| 76 | |||
| 77 | $instance->$method(...($postConstructionCalls[$method])); |
||
| 78 | } |
||
| 82 |