| @@ 526-536 (lines=11) @@ | ||
| 523 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '".$definition->getClass()."' don't match."); |
|
| 524 | } |
|
| 525 | ||
| 526 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
| 527 | { |
|
| 528 | $calls = $definition->getMethodCalls(); |
|
| 529 | if (isset($calls[$pos][0])) { |
|
| 530 | $this->assertEquals($methodName, $calls[$pos][0], "Method '".$methodName."' is expected to be called at position $pos."); |
|
| 531 | ||
| 532 | if ($params !== null) { |
|
| 533 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '".$methodName."' do not match the actual parameters."); |
|
| 534 | } |
|
| 535 | } |
|
| 536 | } |
|
| 537 | ||
| 538 | /** |
|
| 539 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |
|
| @@ 869-879 (lines=11) @@ | ||
| 866 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '".$definition->getClass()."' don't match."); |
|
| 867 | } |
|
| 868 | ||
| 869 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
| 870 | { |
|
| 871 | $calls = $definition->getMethodCalls(); |
|
| 872 | if (isset($calls[$pos][0])) { |
|
| 873 | $this->assertEquals($methodName, $calls[$pos][0], "Method '".$methodName."' is expected to be called at position $pos."); |
|
| 874 | ||
| 875 | if ($params !== null) { |
|
| 876 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '".$methodName."' do not match the actual parameters."); |
|
| 877 | } |
|
| 878 | } |
|
| 879 | } |
|
| 880 | ||
| 881 | /** |
|
| 882 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |
|