Code Duplication    Length = 11-11 lines in 2 locations

Tests/DependencyInjection/DoctrineExtensionTest.php 1 location

@@ 736-746 (lines=11) @@
733
        $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '".$definition->getClass()."' don't match.");
734
    }
735
736
    private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null)
737
    {
738
        $calls = $definition->getMethodCalls();
739
        if (isset($calls[$pos][0])) {
740
            $this->assertEquals($methodName, $calls[$pos][0], "Method '".$methodName."' is expected to be called at position $pos.");
741
742
            if ($params !== null) {
743
                $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '".$methodName."' do not match the actual parameters.");
744
            }
745
        }
746
    }
747
748
    /**
749
     * Assertion for the DI Container, check if the given definition contains a method call with the given parameters.

Tests/DependencyInjection/AbstractDoctrineExtensionTest.php 1 location

@@ 1001-1011 (lines=11) @@
998
        $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '".$definition->getClass()."' don't match.");
999
    }
1000
1001
    private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null)
1002
    {
1003
        $calls = $definition->getMethodCalls();
1004
        if (isset($calls[$pos][0])) {
1005
            $this->assertEquals($methodName, $calls[$pos][0], "Method '".$methodName."' is expected to be called at position $pos.");
1006
1007
            if ($params !== null) {
1008
                $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '".$methodName."' do not match the actual parameters.");
1009
            }
1010
        }
1011
    }
1012
1013
    /**
1014
     * Assertion for the DI Container, check if the given definition contains a method call with the given parameters.