Code Duplication    Length = 11-11 lines in 2 locations

Tests/DependencyInjection/AbstractDoctrineExtensionTest.php 1 location

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

Tests/DependencyInjection/DoctrineExtensionTest.php 1 location

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