Code Duplication    Length = 11-11 lines in 3 locations

tests/Doctrine/Tests/ORM/Functional/ReferenceProxyTest.php 3 locations

@@ 184-194 (lines=11) @@
181
        self::assertEquals('Doctrine 2 Cookbook', $entity->getName());
182
    }
183
184
    public function testDoNotInitializeProxyOnGettingTheIdentifier()
185
    {
186
        $id = $this->createProduct();
187
188
        /* @var $entity ECommerceProduct|GhostObjectInterface */
189
        $entity = $this->em->getReference(ECommerceProduct::class , $id);
190
191
        self::assertFalse($entity->isProxyInitialized(), "Pre-Condition: Object is unitialized proxy.");
192
        self::assertEquals($id, $entity->getId());
193
        self::assertFalse($entity->isProxyInitialized(), "Getting the identifier doesn't initialize the proxy.");
194
    }
195
196
    /**
197
     * @group DDC-1625
@@ 199-209 (lines=11) @@
196
    /**
197
     * @group DDC-1625
198
     */
199
    public function testDoNotInitializeProxyOnGettingTheIdentifier_DDC_1625()
200
    {
201
        $id = $this->createAuction();
202
203
        /* @var $entity CompanyAuction|GhostObjectInterface */
204
        $entity = $this->em->getReference(CompanyAuction::class , $id);
205
206
        self::assertFalse($entity->isProxyInitialized(), "Pre-Condition: Object is unitialized proxy.");
207
        self::assertEquals($id, $entity->getId());
208
        self::assertFalse($entity->isProxyInitialized(), "Getting the identifier doesn't initialize the proxy when extending.");
209
    }
210
211
    public function testDoNotInitializeProxyOnGettingTheIdentifierAndReturnTheRightType()
212
    {
@@ 237-247 (lines=11) @@
234
        self::assertFalse($entity->isProxyInitialized(), "Getting the identifier doesn't initialize the proxy.");
235
    }
236
237
    public function testInitializeProxyOnGettingSomethingOtherThanTheIdentifier()
238
    {
239
        $id = $this->createProduct();
240
241
        /* @var $entity ECommerceProduct|GhostObjectInterface */
242
        $entity = $this->em->getReference(ECommerceProduct::class , $id);
243
244
        self::assertFalse($entity->isProxyInitialized(), "Pre-Condition: Object is unitialized proxy.");
245
        self::assertEquals('Doctrine Cookbook', $entity->getName());
246
        self::assertTrue($entity->isProxyInitialized(), "Getting something other than the identifier initializes the proxy.");
247
    }
248
249
    /**
250
     * @group DDC-1604