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

testSortFieldNumeric() public method

    public function testSortFieldNumeric()
    {
        $locator = $this->getContentSearchHandler();
        $result = $locator->findContent(new Query(array('filter' => new Criterion\LogicalAnd(array(new Criterion\SectionId(array(1)), new Criterion\ContentTypeIdentifier('product'))), 'offset' => 0, 'limit' => null, 'sortClauses' => array(new SortClause\Field('product', 'price', Query::SORT_ASC, 'eng-US')))));
        $this->assertEquals(array(73, 71, 72, 69), array_map(function ($hit) {
            return $hit->valueObject->id;
        }, $result->searchHits));
    }