Code Duplication    Length = 23-24 lines in 2 locations

Tests/Generator/ClassGeneratorTest.php 2 locations

@@ 577-600 (lines=24) @@
574
        $this->compareFileGenerated($resourcesDir, $namespace, $className, $gClassgen);
575
    }
576
577
    public function testInterface()
578
    {
579
        $namespace = 'TestNamespace';
580
        $className = 'Itest';
581
        $gClassgen = new ClassGenerator($namespace, $className);
582
        $gClassgen->setLogger($this->logger);
583
        $config = new ClassConfig();
584
        $config->haveConstructor = true;
585
        $config->isInterface = true;
586
        $properties = [
587
            'fields' => [
588
            'prova' => [
589
                'primitive' => 'int',
590
                'description' => 'session unique identifier',
591
            ],
592
            ],
593
        ];
594
        $typesReferenceArray = [];
595
        $typesDescArray = [];
596
        $gClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config);
597
        $resourcesDir = __DIR__.'/../Resources/php';
598
599
        $this->compareFileGenerated($resourcesDir, $namespace, $className, $gClassgen);
600
    }
601
602
    public function testInterfaceWithGetter()
603
    {
@@ 602-624 (lines=23) @@
599
        $this->compareFileGenerated($resourcesDir, $namespace, $className, $gClassgen);
600
    }
601
602
    public function testInterfaceWithGetter()
603
    {
604
        $namespace = 'TestNamespace';
605
        $className = 'ItestWithGetter';
606
        $gClassgen = new ClassGenerator($namespace, $className);
607
        $gClassgen->setLogger($this->logger);
608
        $config = new ClassConfig();
609
        $config->haveGetter = true;
610
        $config->isInterface = true;
611
        $properties = [
612
            'fields' => [
613
            'prova' => [
614
                'primitive' => 'int',
615
                'description' => 'session unique identifier',
616
            ],
617
            ],
618
        ];
619
        $typesReferenceArray = [];
620
        $typesDescArray = [];
621
        $gClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config);
622
        $resourcesDir = __DIR__.'/../Resources/php';
623
        $this->compareFileGenerated($resourcesDir, $namespace, $className, $gClassgen);
624
    }
625
626
    public function testFirstClassMethodGenerator()
627
    {