Code Duplication    Length = 35-36 lines in 2 locations

Tests/Generator/ClassGeneratorTest.php 2 locations

@@ 343-377 (lines=35) @@
340
        $this->compareFileGenerated($resourcesDir, $namespace, $className, $gClassgen);
341
    }
342
343
    public function testImplementsClassWithNamespaceAndFieldGeneratorMethodWithDependencyAutoInizializeClassWithGetterAll()
344
    {
345
        $namespace = 'TestNamespace';
346
        $className = 'ICWNAFWDACGA';
347
        $gClassgen = new ClassGenerator($namespace, $className);
348
        $gClassgen->setLogger($this->logger);
349
        $config = new ClassConfig();
350
        $config->haveConstructor = true;
351
        $config->haveGetter = true;
352
        $properties = [
353
            'extend' => 'ExtendClass',
354
            'implements' => "NS\IClass",
355
            'fields' => [
356
            'prova' => [
357
                'primitive' => 'int',
358
                'description' => 'session unique identifier',
359
            ],
360
            'dependency' => [
361
                'class' => 'ClassDep',
362
                'autoinizialize' => true,
363
                'default' => 'new ClassDep()',
364
            ],
365
            ],
366
        ];
367
        $typesReferenceArray = [
368
            'ClassDep' => 'NamespaceDep',
369
        ];
370
        $typesDescArray = [
371
            'ClassDep' => 'comment ClassDep',
372
        ];
373
        $gClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config);
374
        $resourcesDir = __DIR__.'/../Resources/php';
375
376
        $this->compareFileGenerated($resourcesDir, $namespace, $className, $gClassgen);
377
    }
378
379
    public function testImplementsClassWithNamespaceAndFieldGeneratorMethodWithDependencyAutoInizializeClassWithGetterAndSetterAll()
380
    {
@@ 379-414 (lines=36) @@
376
        $this->compareFileGenerated($resourcesDir, $namespace, $className, $gClassgen);
377
    }
378
379
    public function testImplementsClassWithNamespaceAndFieldGeneratorMethodWithDependencyAutoInizializeClassWithGetterAndSetterAll()
380
    {
381
        $namespace = 'TestNamespace';
382
        $className = 'ICWNAFWDACGSA';
383
        $gClassgen = new ClassGenerator($namespace, $className);
384
        $gClassgen->setLogger($this->logger);
385
        $config = new ClassConfig();
386
        $config->haveConstructor = true;
387
        $config->haveGetter = true;
388
        $config->haveSetter = true;
389
        $properties = [
390
            'extend' => 'ExtendClass',
391
            'implements' => "NS\IClass",
392
            'fields' => [
393
            'prova' => [
394
                'primitive' => 'int',
395
                'description' => 'session unique identifier',
396
            ],
397
            'dependency' => [
398
                'class' => 'ClassDep',
399
                'autoinizialize' => false,
400
                'default' => 'new ClassDep()',
401
            ],
402
            ],
403
        ];
404
        $typesReferenceArray = [
405
            'ClassDep' => 'NamespaceDep',
406
        ];
407
        $typesDescArray = [
408
            'ClassDep' => 'comment ClassDep',
409
        ];
410
        $gClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config);
411
        $resourcesDir = __DIR__.'/../Resources/php';
412
413
        $this->compareFileGenerated($resourcesDir, $namespace, $className, $gClassgen);
414
    }
415
416
    public function testImplementsClassWithNamespaceAndFieldGeneratorMethodWithDependencyAutoInizializeClassWithGetterAndSetterAllStaticExplicit()
417
    {