Code Duplication    Length = 16-16 lines in 2 locations

tests/MetadataManagerTest.php 2 locations

@@ 390-405 (lines=16) @@
387
        $this->assertEquals($expected, $actual);
388
    }
389
390
    public function testCreateSingletonEmptyName()
391
    {
392
        $returnType = m::mock(TEntityTypeType::class);
393
        $this->assertTrue($returnType instanceof TEntityTypeType, get_class($returnType));
394
        $foo = new MetadataManager();
395
396
        $expected = 'Name must be a non-empty string';
397
        $actual = null;
398
399
        try {
400
            $foo->createSingleton(null, $returnType, null);
401
        } catch (\InvalidArgumentException $e) {
402
            $actual = $e->getMessage();
403
        }
404
        $this->assertEquals($expected, $actual);
405
    }
406
407
    public function testCreateSingletonNonStringName()
408
    {
@@ 407-422 (lines=16) @@
404
        $this->assertEquals($expected, $actual);
405
    }
406
407
    public function testCreateSingletonNonStringName()
408
    {
409
        $returnType = m::mock(TEntityTypeType::class);
410
        $this->assertTrue($returnType instanceof TEntityTypeType, get_class($returnType));
411
        $foo = new MetadataManager();
412
413
        $expected = 'Name must be a non-empty string';
414
        $actual = null;
415
416
        try {
417
            $foo->createSingleton($returnType, $returnType, null);
418
        } catch (\InvalidArgumentException $e) {
419
            $actual = $e->getMessage();
420
        }
421
        $this->assertEquals($expected, $actual);
422
    }
423
424
    public function testCreateSingletonSuccessful()
425
    {