| @@ 992-1002 (lines=11) @@ | ||
| 989 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '".$definition->getClass()."' don't match."); |
|
| 990 | } |
|
| 991 | ||
| 992 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
| 993 | { |
|
| 994 | $calls = $definition->getMethodCalls(); |
|
| 995 | if (isset($calls[$pos][0])) { |
|
| 996 | $this->assertEquals($methodName, $calls[$pos][0], "Method '".$methodName."' is expected to be called at position $pos."); |
|
| 997 | ||
| 998 | if ($params !== null) { |
|
| 999 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '".$methodName."' do not match the actual parameters."); |
|
| 1000 | } |
|
| 1001 | } |
|
| 1002 | } |
|
| 1003 | ||
| 1004 | /** |
|
| 1005 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |
|
| @@ 735-745 (lines=11) @@ | ||
| 732 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '".$definition->getClass()."' don't match."); |
|
| 733 | } |
|
| 734 | ||
| 735 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
| 736 | { |
|
| 737 | $calls = $definition->getMethodCalls(); |
|
| 738 | if (isset($calls[$pos][0])) { |
|
| 739 | $this->assertEquals($methodName, $calls[$pos][0], "Method '".$methodName."' is expected to be called at position $pos."); |
|
| 740 | ||
| 741 | if ($params !== null) { |
|
| 742 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '".$methodName."' do not match the actual parameters."); |
|
| 743 | } |
|
| 744 | } |
|
| 745 | } |
|
| 746 | ||
| 747 | /** |
|
| 748 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |
|