@@ 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. |
@@ 779-793 (lines=15) @@ | ||
776 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '" . $definition->getClass() . "' don't match."); |
|
777 | } |
|
778 | ||
779 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
780 | { |
|
781 | $calls = $definition->getMethodCalls(); |
|
782 | if (! isset($calls[$pos][0])) { |
|
783 | return; |
|
784 | } |
|
785 | ||
786 | $this->assertEquals($methodName, $calls[$pos][0], "Method '" . $methodName . "' is expected to be called at position " . $pos . '.'); |
|
787 | ||
788 | if ($params === null) { |
|
789 | return; |
|
790 | } |
|
791 | ||
792 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '" . $methodName . "' do not match the actual parameters."); |
|
793 | } |
|
794 | ||
795 | /** |
|
796 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |