Code Duplication    Length = 16-16 lines in 2 locations

tests/MetadataManagerTest.php 2 locations

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