@@ 1071-1087 (lines=17) @@ | ||
1068 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '" . $definition->getClass() . "' don't match."); |
|
1069 | } |
|
1070 | ||
1071 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
1072 | { |
|
1073 | $calls = $definition->getMethodCalls(); |
|
1074 | if (! isset($calls[$pos][0])) { |
|
1075 | $this->fail(sprintf('Method call at position %s not found!', $pos)); |
|
1076 | ||
1077 | return; |
|
1078 | } |
|
1079 | ||
1080 | $this->assertEquals($methodName, $calls[$pos][0], "Method '" . $methodName . "' is expected to be called at position " . $pos . '.'); |
|
1081 | ||
1082 | if ($params === null) { |
|
1083 | return; |
|
1084 | } |
|
1085 | ||
1086 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '" . $methodName . "' do not match the actual parameters."); |
|
1087 | } |
|
1088 | ||
1089 | /** |
|
1090 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |
@@ 892-906 (lines=15) @@ | ||
889 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '" . $definition->getClass() . "' don't match."); |
|
890 | } |
|
891 | ||
892 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
893 | { |
|
894 | $calls = $definition->getMethodCalls(); |
|
895 | if (! isset($calls[$pos][0])) { |
|
896 | return; |
|
897 | } |
|
898 | ||
899 | $this->assertEquals($methodName, $calls[$pos][0], "Method '" . $methodName . "' is expected to be called at position " . $pos . '.'); |
|
900 | ||
901 | if ($params === null) { |
|
902 | return; |
|
903 | } |
|
904 | ||
905 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '" . $methodName . "' do not match the actual parameters."); |
|
906 | } |
|
907 | ||
908 | /** |
|
909 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |