@@ 764-774 (lines=11) @@ | ||
761 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '".$definition->getClass()."' don't match."); |
|
762 | } |
|
763 | ||
764 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
765 | { |
|
766 | $calls = $definition->getMethodCalls(); |
|
767 | if (isset($calls[$pos][0])) { |
|
768 | $this->assertEquals($methodName, $calls[$pos][0], "Method '".$methodName."' is expected to be called at position $pos."); |
|
769 | ||
770 | if ($params !== null) { |
|
771 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '".$methodName."' do not match the actual parameters."); |
|
772 | } |
|
773 | } |
|
774 | } |
|
775 | ||
776 | /** |
|
777 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |
@@ 1036-1046 (lines=11) @@ | ||
1033 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '".$definition->getClass()."' don't match."); |
|
1034 | } |
|
1035 | ||
1036 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
1037 | { |
|
1038 | $calls = $definition->getMethodCalls(); |
|
1039 | if (isset($calls[$pos][0])) { |
|
1040 | $this->assertEquals($methodName, $calls[$pos][0], "Method '".$methodName."' is expected to be called at position $pos."); |
|
1041 | ||
1042 | if ($params !== null) { |
|
1043 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '".$methodName."' do not match the actual parameters."); |
|
1044 | } |
|
1045 | } |
|
1046 | } |
|
1047 | ||
1048 | /** |
|
1049 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |