Conditions | 1 |
Paths | 1 |
Total Lines | 25 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
34 | public static function ObtainHttpHandlerInstance( |
||
35 | TestCase $testCase, |
||
36 | string $implementation, |
||
37 | ...$implementationArgs |
||
38 | ) : HttpHandler { |
||
39 | $testCase->assertTrue( |
||
40 | is_a($implementation, HttpHandler::class, true), |
||
41 | sprintf( |
||
42 | 'Argument %u passed to %s must be an implementation of %s', |
||
43 | 1, |
||
44 | __METHOD__, |
||
45 | HttpHandler::class |
||
46 | ) |
||
47 | ); |
||
48 | |||
49 | /** |
||
50 | * @var HttpHandler $instance |
||
51 | */ |
||
52 | $instance = static::ObtainFrameworkInstance( |
||
53 | $testCase, |
||
54 | $implementation, |
||
55 | ...$implementationArgs |
||
56 | ); |
||
57 | |||
58 | return $instance; |
||
59 | } |
||
82 |