| Conditions | 1 |
| Paths | 1 |
| Total Lines | 39 |
| Code Lines | 28 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function it_should_resolve_arguments( |
||
| 37 | ReflectionClass $reflectionClass, |
||
| 38 | ServiceManager $serviceManager |
||
| 39 | ) { |
||
| 40 | $arguments = [ |
||
| 41 | '@Config', |
||
| 42 | '@My\Example\Service', |
||
| 43 | '1', |
||
| 44 | 'simple string', |
||
| 45 | ]; |
||
| 46 | |||
| 47 | $result = [ |
||
| 48 | '@Config@', |
||
| 49 | '@My\Example\Service@', |
||
| 50 | '1', |
||
| 51 | 'simple string', |
||
| 52 | ]; |
||
| 53 | |||
| 54 | $this->application->getServiceManager() |
||
| 55 | ->shouldBeCalled() |
||
| 56 | ->willReturn($serviceManager); |
||
| 57 | |||
| 58 | $serviceManager->get() |
||
| 59 | ->shouldBeCalled() |
||
| 60 | ->withArguments([ |
||
| 61 | substr($arguments[0], 1), |
||
| 62 | ]) |
||
| 63 | ->willReturn($result[0]); |
||
| 64 | |||
| 65 | $serviceManager->get() |
||
| 66 | ->shouldBeCalled() |
||
| 67 | ->withArguments([ |
||
| 68 | substr($arguments[1], 1), |
||
| 69 | ]) |
||
| 70 | ->willReturn($result[1]); |
||
| 71 | |||
| 72 | $this->resolveArguments($reflectionClass, $arguments) |
||
| 73 | ->shouldReturn($result); |
||
| 74 | } |
||
| 75 | } |
||
| 76 |