| @@ 1022-1036 (lines=15) @@ | ||
| 1019 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '" . $definition->getClass() . "' don't match."); |
|
| 1020 | } |
|
| 1021 | ||
| 1022 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
| 1023 | { |
|
| 1024 | $calls = $definition->getMethodCalls(); |
|
| 1025 | if (! isset($calls[$pos][0])) { |
|
| 1026 | return; |
|
| 1027 | } |
|
| 1028 | ||
| 1029 | $this->assertEquals($methodName, $calls[$pos][0], "Method '" . $methodName . "' is expected to be called at position " . $pos . '.'); |
|
| 1030 | ||
| 1031 | if ($params === null) { |
|
| 1032 | return; |
|
| 1033 | } |
|
| 1034 | ||
| 1035 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '" . $methodName . "' do not match the actual parameters."); |
|
| 1036 | } |
|
| 1037 | ||
| 1038 | /** |
|
| 1039 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |
|
| @@ 784-798 (lines=15) @@ | ||
| 781 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '" . $definition->getClass() . "' don't match."); |
|
| 782 | } |
|
| 783 | ||
| 784 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
| 785 | { |
|
| 786 | $calls = $definition->getMethodCalls(); |
|
| 787 | if (! isset($calls[$pos][0])) { |
|
| 788 | return; |
|
| 789 | } |
|
| 790 | ||
| 791 | $this->assertEquals($methodName, $calls[$pos][0], "Method '" . $methodName . "' is expected to be called at position " . $pos . '.'); |
|
| 792 | ||
| 793 | if ($params === null) { |
|
| 794 | return; |
|
| 795 | } |
|
| 796 | ||
| 797 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '" . $methodName . "' do not match the actual parameters."); |
|
| 798 | } |
|
| 799 | ||
| 800 | /** |
|
| 801 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |
|