@@ 1081-1097 (lines=17) @@ | ||
1078 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '" . $definition->getClass() . "' don't match."); |
|
1079 | } |
|
1080 | ||
1081 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
1082 | { |
|
1083 | $calls = $definition->getMethodCalls(); |
|
1084 | if (! isset($calls[$pos][0])) { |
|
1085 | $this->fail(sprintf('Method call at position %s not found!', $pos)); |
|
1086 | ||
1087 | return; |
|
1088 | } |
|
1089 | ||
1090 | $this->assertEquals($methodName, $calls[$pos][0], "Method '" . $methodName . "' is expected to be called at position " . $pos . '.'); |
|
1091 | ||
1092 | if ($params === null) { |
|
1093 | return; |
|
1094 | } |
|
1095 | ||
1096 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '" . $methodName . "' do not match the actual parameters."); |
|
1097 | } |
|
1098 | ||
1099 | /** |
|
1100 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |
@@ 846-860 (lines=15) @@ | ||
843 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '" . $definition->getClass() . "' don't match."); |
|
844 | } |
|
845 | ||
846 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
847 | { |
|
848 | $calls = $definition->getMethodCalls(); |
|
849 | if (! isset($calls[$pos][0])) { |
|
850 | return; |
|
851 | } |
|
852 | ||
853 | $this->assertEquals($methodName, $calls[$pos][0], "Method '" . $methodName . "' is expected to be called at position " . $pos . '.'); |
|
854 | ||
855 | if ($params === null) { |
|
856 | return; |
|
857 | } |
|
858 | ||
859 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '" . $methodName . "' do not match the actual parameters."); |
|
860 | } |
|
861 | ||
862 | /** |
|
863 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |