| @@ 951-961 (lines=11) @@ | ||
| 948 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '".$definition->getClass()."' don't match."); |
|
| 949 | } |
|
| 950 | ||
| 951 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
| 952 | { |
|
| 953 | $calls = $definition->getMethodCalls(); |
|
| 954 | if (isset($calls[$pos][0])) { |
|
| 955 | $this->assertEquals($methodName, $calls[$pos][0], "Method '".$methodName."' is expected to be called at position $pos."); |
|
| 956 | ||
| 957 | if ($params !== null) { |
|
| 958 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '".$methodName."' do not match the actual parameters."); |
|
| 959 | } |
|
| 960 | } |
|
| 961 | } |
|
| 962 | ||
| 963 | /** |
|
| 964 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |
|
| @@ 706-716 (lines=11) @@ | ||
| 703 | $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '".$definition->getClass()."' don't match."); |
|
| 704 | } |
|
| 705 | ||
| 706 | private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null) |
|
| 707 | { |
|
| 708 | $calls = $definition->getMethodCalls(); |
|
| 709 | if (isset($calls[$pos][0])) { |
|
| 710 | $this->assertEquals($methodName, $calls[$pos][0], "Method '".$methodName."' is expected to be called at position $pos."); |
|
| 711 | ||
| 712 | if ($params !== null) { |
|
| 713 | $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '".$methodName."' do not match the actual parameters."); |
|
| 714 | } |
|
| 715 | } |
|
| 716 | } |
|
| 717 | ||
| 718 | /** |
|
| 719 | * Assertion for the DI Container, check if the given definition contains a method call with the given parameters. |
|