eZ\Publish\Core\Search\Legacy\Tests\Content\HandlerContentSortTest::testSortDateModified PHP Method

testSortDateModified() public method

    public function testSortDateModified()
    {
        $locator = $this->getContentSearchHandler();
        $result = $locator->findContent(new Query(array('filter' => new Criterion\SectionId(array(2)), 'offset' => 0, 'limit' => 10, 'sortClauses' => array(new SortClause\DateModified()))));
        $this->assertEquals(array(4, 12, 13, 42, 10, 14, 11, 226), array_map(function ($hit) {
            return $hit->valueObject->id;
        }, $result->searchHits));
    }