Code Duplication    Length = 11-15 lines in 4 locations

tests/Doctrine/Tests/ORM/ConfigurationTest.php 4 locations

@@ 197-207 (lines=11) @@
194
        $this->configuration->ensureProductionSettings();
195
    }
196
197
    public function testAddGetCustomStringFunction()
198
    {
199
        $this->configuration->addCustomStringFunction('FunctionName', __CLASS__);
200
201
        self::assertSame(__CLASS__, $this->configuration->getCustomStringFunction('FunctionName'));
202
        self::assertNull($this->configuration->getCustomStringFunction('NonExistingFunction'));
203
204
        $this->configuration->setCustomStringFunctions(['OtherFunctionName' => __CLASS__]);
205
206
        self::assertSame(__CLASS__, $this->configuration->getCustomStringFunction('OtherFunctionName'));
207
    }
208
209
    public function testAddGetCustomNumericFunction()
210
    {
@@ 209-219 (lines=11) @@
206
        self::assertSame(__CLASS__, $this->configuration->getCustomStringFunction('OtherFunctionName'));
207
    }
208
209
    public function testAddGetCustomNumericFunction()
210
    {
211
        $this->configuration->addCustomNumericFunction('FunctionName', __CLASS__);
212
213
        self::assertSame(__CLASS__, $this->configuration->getCustomNumericFunction('FunctionName'));
214
        self::assertNull($this->configuration->getCustomNumericFunction('NonExistingFunction'));
215
216
        $this->configuration->setCustomNumericFunctions(['OtherFunctionName' => __CLASS__]);
217
218
        self::assertSame(__CLASS__, $this->configuration->getCustomNumericFunction('OtherFunctionName'));
219
    }
220
221
    public function testAddGetCustomDatetimeFunction()
222
    {
@@ 221-231 (lines=11) @@
218
        self::assertSame(__CLASS__, $this->configuration->getCustomNumericFunction('OtherFunctionName'));
219
    }
220
221
    public function testAddGetCustomDatetimeFunction()
222
    {
223
        $this->configuration->addCustomDatetimeFunction('FunctionName', __CLASS__);
224
225
        self::assertSame(__CLASS__, $this->configuration->getCustomDatetimeFunction('FunctionName'));
226
        self::assertNull($this->configuration->getCustomDatetimeFunction('NonExistingFunction'));
227
228
        $this->configuration->setCustomDatetimeFunctions(['OtherFunctionName' => __CLASS__]);
229
230
        self::assertSame(__CLASS__, $this->configuration->getCustomDatetimeFunction('OtherFunctionName'));
231
    }
232
233
    public function testAddGetCustomHydrationMode()
234
    {
@@ 242-256 (lines=15) @@
239
        self::assertSame(__CLASS__, $this->configuration->getCustomHydrationMode('HydrationModeName'));
240
    }
241
242
    public function testSetCustomHydrationModes()
243
    {
244
        $this->configuration->addCustomHydrationMode('HydrationModeName', __CLASS__);
245
246
        self::assertSame(__CLASS__, $this->configuration->getCustomHydrationMode('HydrationModeName'));
247
248
        $this->configuration->setCustomHydrationModes(
249
            [
250
                'AnotherHydrationModeName' => __CLASS__
251
            ]
252
        );
253
254
        self::assertNull($this->configuration->getCustomHydrationMode('HydrationModeName'));
255
        self::assertSame(__CLASS__, $this->configuration->getCustomHydrationMode('AnotherHydrationModeName'));
256
    }
257
258
    public function testSetGetClassMetadataFactoryName()
259
    {