Code Duplication    Length = 9-14 lines in 3 locations

eZ/Publish/Core/Persistence/Legacy/Tests/Content/Location/Gateway/DoctrineDatabaseTest.php 1 location

@@ 64-75 (lines=12) @@
61
    /**
62
     * @dataProvider getLoadLocationValues
63
     */
64
    public function testLoadLocationByRemoteId($field, $value)
65
    {
66
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php');
67
        $handler = $this->getLocationGateway();
68
        $data = $handler->getBasicNodeDataByRemoteId('dbc2f3c8716c12f32c379dbf0b1cb133');
69
70
        $this->assertEquals(
71
            $value,
72
            $data[$field],
73
            "Value in property $field not as expected."
74
        );
75
    }
76
77
    /**
78
     * @dataProvider getLoadLocationValues

eZ/Publish/Core/Persistence/Legacy/Tests/Content/Location/Gateway/DoctrineDatabaseTrashTest.php 2 locations

@@ 213-226 (lines=14) @@
210
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\DoctrineDatabase::loadTrashByLocation
211
     * @dataProvider getLoadTrashValues
212
     */
213
    public function testLoadTrashByLocationId($field, $value)
214
    {
215
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php');
216
        $handler = $this->getLocationGateway();
217
        $handler->trashLocation(71);
218
219
        $data = $handler->loadTrashByLocation(71);
220
221
        $this->assertEquals(
222
            $value,
223
            $data[$field],
224
            "Value in property $field not as expected."
225
        );
226
    }
227
228
    /**
229
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\DoctrineDatabase::listTrashed
@@ 310-318 (lines=9) @@
307
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\DoctrineDatabase::listTrashed
308
     * @dataProvider getTrashValues
309
     */
310
    public function testListTrashItem($key, $value)
311
    {
312
        $this->insertDatabaseFixture(__DIR__ . '/_fixtures/full_example_tree.php');
313
        $handler = $this->getLocationGateway();
314
        $this->trashSubtree();
315
316
        $trashList = $handler->listTrashed(0, 1, array());
317
        $this->assertEquals($value, $trashList[0][$key]);
318
    }
319
320
    /**
321
     * @covers \eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway\DoctrineDatabase::listTrashed