Code Duplication    Length = 16-18 lines in 2 locations

tests/Doctrine/Tests/ORM/Tools/EntityRepositoryGeneratorTest.php 1 location

@@ 34-49 (lines=16) @@
31
    /**
32
     * @inheritdoc
33
     */
34
    public function setUp()
35
    {
36
        $this->namespace   = uniqid('doctrine_');
37
        $this->tmpDir      = \sys_get_temp_dir() . DIRECTORY_SEPARATOR . $this->namespace;
38
        \mkdir($this->tmpDir);
39
40
        $this->generator = new EntityGenerator();
41
42
        $this->generator->setGenerateAnnotations(true);
43
        $this->generator->setGenerateStubMethods(true);
44
        $this->generator->setRegenerateEntityIfExists(false);
45
        $this->generator->setUpdateEntityIfExists(true);
46
        $this->generator->setFieldVisibility(EntityGenerator::FIELD_VISIBLE_PROTECTED);
47
48
        $this->repositoryGenerator = new EntityRepositoryGenerator();
49
    }
50
51
    /**
52
     * @inheritdoc

tests/Doctrine/Tests/ORM/Tools/EntityGeneratorTest.php 1 location

@@ 34-51 (lines=18) @@
31
     */
32
    private $metadataBuildingContext;
33
34
    public function setUp()
35
    {
36
        $this->metadataBuildingContext = new Mapping\ClassMetadataBuildingContext(
37
            $this->createMock(ClassMetadataFactory::class)
38
        );
39
        $this->namespace = uniqid("doctrine_", false);
40
        $this->tmpDir = sys_get_temp_dir();
41
42
        mkdir($this->tmpDir . \DIRECTORY_SEPARATOR . $this->namespace);
43
44
        $this->generator = new EntityGenerator();
45
46
        $this->generator->setGenerateAnnotations(true);
47
        $this->generator->setGenerateStubMethods(true);
48
        $this->generator->setRegenerateEntityIfExists(false);
49
        $this->generator->setUpdateEntityIfExists(true);
50
        $this->generator->setFieldVisibility(EntityGenerator::FIELD_VISIBLE_PROTECTED);
51
    }
52
53
    public function tearDown()
54
    {