Code Duplication    Length = 9-14 lines in 3 locations

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

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

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

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