Code Duplication    Length = 20-22 lines in 3 locations

eZ/Publish/Core/Search/Legacy/Tests/Content/HandlerLocationSortTest.php 3 locations

@@ 265-284 (lines=20) @@
262
        );
263
    }
264
265
    public function testSortLocationDepth()
266
    {
267
        $handler = $this->getContentSearchHandler();
268
269
        $locations = $handler->findLocations(
270
            new LocationQuery(
271
                array(
272
                    'filter' => new Criterion\LocationId(array(148, 167, 169, 172)),
273
                    'offset' => 0,
274
                    'limit' => 10,
275
                    'sortClauses' => array(new SortClause\Location\Depth(LocationQuery::SORT_ASC)),
276
                )
277
            )
278
        );
279
280
        $this->assertSearchResults(
281
            array(167, 172, 169, 148),
282
            $locations
283
        );
284
    }
285
286
    public function testSortLocationDepthAndPath()
287
    {
@@ 310-331 (lines=22) @@
307
        );
308
    }
309
310
    public function testSortLocationPriority()
311
    {
312
        $handler = $this->getContentSearchHandler();
313
314
        $locations = $handler->findLocations(
315
            new LocationQuery(
316
                array(
317
                    'filter' => new Criterion\LocationId(array(149, 156, 167)),
318
                    'offset' => 0,
319
                    'limit' => 10,
320
                    'sortClauses' => array(
321
                        new SortClause\Location\Priority(LocationQuery::SORT_DESC),
322
                    ),
323
                )
324
            )
325
        );
326
327
        $this->assertSearchResults(
328
            array(167, 156, 149),
329
            $locations
330
        );
331
    }
332
333
    public function testSortDateModified()
334
    {
@@ 356-377 (lines=22) @@
353
        );
354
    }
355
356
    public function testSortDatePublished()
357
    {
358
        $handler = $this->getContentSearchHandler();
359
360
        $locations = $handler->findLocations(
361
            new LocationQuery(
362
                array(
363
                    'filter' => new Criterion\LocationId(array(148, 167, 169, 172)),
364
                    'offset' => 0,
365
                    'limit' => 10,
366
                    'sortClauses' => array(
367
                        new SortClause\DatePublished(LocationQuery::SORT_DESC),
368
                    ),
369
                )
370
            )
371
        );
372
373
        $this->assertSearchResults(
374
            array(148, 172, 169, 167),
375
            $locations
376
        );
377
    }
378
379
    public function testSortSectionIdentifier()
380
    {