Code Duplication    Length = 11-11 lines in 2 locations

Tests/DependencyInjection/DoctrineExtensionTest.php 1 location

@@ 712-722 (lines=11) @@
709
        $this->assertEquals($args, $definition->getArguments(), "Expected and actual DIC Service constructor arguments of definition '".$definition->getClass()."' don't match.");
710
    }
711
712
    private function assertDICDefinitionMethodCallAt($pos, Definition $definition, $methodName, array $params = null)
713
    {
714
        $calls = $definition->getMethodCalls();
715
        if (isset($calls[$pos][0])) {
716
            $this->assertEquals($methodName, $calls[$pos][0], "Method '".$methodName."' is expected to be called at position $pos.");
717
718
            if ($params !== null) {
719
                $this->assertEquals($params, $calls[$pos][1], "Expected parameters to methods '".$methodName."' do not match the actual parameters.");
720
            }
721
        }
722
    }
723
724
    /**
725
     * Assertion for the DI Container, check if the given definition contains a method call with the given parameters.

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.