| @@ 1021-1031 (lines=11) @@ | ||
| 1018 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '" . $definition->getClass() . "' don't match."); | |
| 1019 | } | |
| 1020 | ||
| 1021 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) | |
| 1022 |     { | |
| 1023 | $calls = $definition->getMethodCalls(); | |
| 1024 |         if (isset($calls[$pos][0])) { | |
| 1025 | $this->assertEquals($methodName, $calls[$pos][0], "Method '" . $methodName . "' is expected to be called at position " . $pos . '.'); | |
| 1026 | ||
| 1027 |             if ($params !== null) { | |
| 1028 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '" . $methodName . "' do not match the actual parameters."); | |
| 1029 | } | |
| 1030 | } | |
| 1031 | } | |
| 1032 | ||
| 1033 | /** | |
| 1034 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. | |
| @@ 754-764 (lines=11) @@ | ||
| 751 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '" . $definition->getClass() . "' don't match."); | |
| 752 | } | |
| 753 | ||
| 754 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) | |
| 755 |     { | |
| 756 | $calls = $definition->getMethodCalls(); | |
| 757 |         if (isset($calls[$pos][0])) { | |
| 758 | $this->assertEquals($methodName, $calls[$pos][0], "Method '" . $methodName . "' is expected to be called at position " . $pos . '.'); | |
| 759 | ||
| 760 |             if ($params !== null) { | |
| 761 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '" . $methodName . "' do not match the actual parameters."); | |
| 762 | } | |
| 763 | } | |
| 764 | } | |
| 765 | ||
| 766 | /** | |
| 767 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. | |