@@ 993-1003 (lines=11) @@ | ||
990 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '".$definition->getClass()."' don't match."); |
|
991 | } |
|
992 | ||
993 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
994 | { |
|
995 | $calls = $definition->getMethodCalls(); |
|
996 | if (isset($calls[$pos][0])) { |
|
997 | $this->assertEquals($methodName, $calls[$pos][0], "Method '".$methodName."' is expected to be called at position $pos."); |
|
998 | ||
999 | if ($params !== null) { |
|
1000 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '".$methodName."' do not match the actual parameters."); |
|
1001 | } |
|
1002 | } |
|
1003 | } |
|
1004 | ||
1005 | /** |
|
1006 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |
@@ 760-770 (lines=11) @@ | ||
757 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '".$definition->getClass()."' don't match."); |
|
758 | } |
|
759 | ||
760 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
761 | { |
|
762 | $calls = $definition->getMethodCalls(); |
|
763 | if (isset($calls[$pos][0])) { |
|
764 | $this->assertEquals($methodName, $calls[$pos][0], "Method '".$methodName."' is expected to be called at position $pos."); |
|
765 | ||
766 | if ($params !== null) { |
|
767 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '".$methodName."' do not match the actual parameters."); |
|
768 | } |
|
769 | } |
|
770 | } |
|
771 | ||
772 | /** |
|
773 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |