Code Duplication    Length = 8-11 lines in 3 locations

tests/Type/PhpEnumTypeTest.php 3 locations

@@ 145-152 (lines=8) @@
142
    /**
143
     * @test
144
     */
145
    public function convertToPHPValueWithNullReturnsNull()
146
    {
147
        PhpEnumType::registerEnumType(Action::class);
148
        $type = Type::getType(Action::class);
149
150
        $value = $type->convertToPHPValue(null, $this->platform->reveal());
151
        $this->assertNull($value);
152
    }
153
154
    /**
155
     * @test
@@ 174-181 (lines=8) @@
171
    /**
172
     * @test
173
     */
174
    public function usingChildEnumTypeRegisteredValueIsCorrect()
175
    {
176
        MyType::registerEnumType(Action::class);
177
        $type = Type::getType(Action::class);
178
179
        $this->assertInstanceOf(MyType::class, $type);
180
        $this->assertEquals('FOO BAR', $type->getSQLDeclaration([], $this->platform->reveal()));
181
    }
182
183
    /**
184
     * @test
@@ 186-196 (lines=11) @@
183
    /**
184
     * @test
185
     */
186
    public function usingChildCustomEnumTypeRegisteredValueIsCorrect()
187
    {
188
        MyCustomEnumType::registerEnumType(Action::class);
189
        $type = MyCustomEnumType::getType(Action::class);
190
191
        $this->assertInstanceOf(MyCustomEnumType::class, $type);
192
        $this->assertEquals(
193
            'ENUM("create", "read", "update", "delete") COMMENT "Acelaya\Test\Doctrine\Enum\Action"',
194
            $type->getSQLDeclaration([], $this->platform->reveal())
195
        );
196
    }
197
198
    /**
199
     * @test