Code Duplication    Length = 15-15 lines in 3 locations

Tests/DependencyInjection/AbstractDoctrineExtensionTest.php 3 locations

@@ 837-851 (lines=15) @@
834
     * @expectedException \InvalidArgumentException
835
     * @expectedExceptionMessage EntityListenerServiceResolver
836
     */
837
    public function testLazyEntityListenerResolverWithoutCorrectInterface()
838
    {
839
        if (version_compare(Version::VERSION, '2.5.0-DEV') < 0) {
840
            $this->markTestSkipped('Attaching entity listeners by tag requires doctrine-orm 2.5.0 or newer');
841
        }
842
843
        $container = $this->getContainer(array());
844
        $loader = new DoctrineExtension();
845
        $container->registerExtension($loader);
846
        $container->addCompilerPass(new EntityListenerPass());
847
848
        $this->loadFromFile($container, 'orm_entity_listener_lazy_resolver_without_interface');
849
850
        $this->compileContainer($container);
851
    }
852
853
    /**
854
     * @expectedException \InvalidArgumentException
@@ 857-871 (lines=15) @@
854
     * @expectedException \InvalidArgumentException
855
     * @expectedExceptionMessageRegExp /The service ".*" must be public as this entity listener is lazy-loaded/
856
     */
857
    public function testPrivateLazyEntityListener()
858
    {
859
        if (version_compare(Version::VERSION, '2.5.0-DEV') < 0) {
860
            $this->markTestSkipped('Attaching entity listeners by tag requires doctrine-orm 2.5.0 or newer');
861
        }
862
863
        $container = $this->getContainer(array());
864
        $loader = new DoctrineExtension();
865
        $container->registerExtension($loader);
866
        $container->addCompilerPass(new EntityListenerPass());
867
868
        $this->loadFromFile($container, 'orm_entity_listener_lazy_private');
869
870
        $this->compileContainer($container);
871
    }
872
873
    /**
874
     * @expectedException \InvalidArgumentException
@@ 877-891 (lines=15) @@
874
     * @expectedException \InvalidArgumentException
875
     * @expectedExceptionMessageRegExp /The service ".*" must not be abstract as this entity listener is lazy-loaded/
876
     */
877
    public function testAbstractLazyEntityListener()
878
    {
879
        if (version_compare(Version::VERSION, '2.5.0-DEV') < 0) {
880
            $this->markTestSkipped('Attaching entity listeners by tag requires doctrine-orm 2.5.0 or newer');
881
        }
882
883
        $container = $this->getContainer(array());
884
        $loader = new DoctrineExtension();
885
        $container->registerExtension($loader);
886
        $container->addCompilerPass(new EntityListenerPass());
887
888
        $this->loadFromFile($container, 'orm_entity_listener_lazy_abstract');
889
890
        $this->compileContainer($container);
891
    }
892
893
    public function testRepositoryFactory()
894
    {