Code Duplication    Length = 25-26 lines in 2 locations

Tests/Generator/ClassGeneratorTest.php 2 locations

@@ 153-177 (lines=25) @@
150
        $this->compareFileGenerated($resourcesDir, $namespace, $className, $gClassgenClassgen);
151
    }
152
153
    public function testImplementsClassWithNamespaceAndFieldGeneratorMethod()
154
    {
155
        $namespace = 'TestNamespace';
156
        $className = 'ImplementsClassWithNamespaceAndField';
157
        $gClassgen = new ClassGenerator($namespace, $className);
158
        $gClassgen->setLogger($this->logger);
159
        $config = new ClassConfig();
160
        $config->haveConstructor = true;
161
        $properties = [
162
            'extend' => 'ExtendClass',
163
            'implements' => "NS\IClass",
164
            'fields' => [
165
            'prova' => [
166
                'primitive' => 'int',
167
                'description' => 'identificativo univoco della sessione',
168
            ],
169
            ],
170
        ];
171
        $typesReferenceArray = [];
172
        $typesDescArray = [];
173
        $gClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config);
174
        $resourcesDir = __DIR__.'/../Resources/php';
175
176
        $this->compareFileGenerated($resourcesDir, $namespace, $className, $gClassgen);
177
    }
178
179
    public function testImplementsClassWithNamespaceAndFieldGeneratorMethodStatic()
180
    {
@@ 179-204 (lines=26) @@
176
        $this->compareFileGenerated($resourcesDir, $namespace, $className, $gClassgen);
177
    }
178
179
    public function testImplementsClassWithNamespaceAndFieldGeneratorMethodStatic()
180
    {
181
        $namespace = 'TestNamespace';
182
        $className = 'ImplementsClassWithNamespaceAndFieldStatic';
183
        $gClassgen = new ClassGenerator($namespace, $className);
184
        $gClassgen->setLogger($this->logger);
185
        $config = new ClassConfig();
186
        $config->haveConstructor = true;
187
        $properties = [
188
            'extend' => 'ExtendClass',
189
            'implements' => "NS\IClass",
190
            'fields' => [
191
            'prova' => [
192
                'primitive' => 'int',
193
                'description' => 'identificativo univoco della sessione',
194
                'static' => true,
195
            ],
196
            ],
197
        ];
198
        $typesReferenceArray = [];
199
        $typesDescArray = [];
200
        $gClassgen->generateClassType($properties, $typesReferenceArray, $typesDescArray, $config);
201
        $resourcesDir = __DIR__.'/../Resources/php';
202
203
        $this->compareFileGenerated($resourcesDir, $namespace, $className, $gClassgen);
204
    }
205
206
    public function testImplementsClassWithNamespaceAndFieldGeneratorMethodWithDependency()
207
    {