3 * SPDX-License-Identifier: GPL-2.0-only
5 * This file is part of Nominatim. (https://nominatim.org)
7 * Copyright (C) 2022 by the Nominatim developer community.
8 * For a full list of authors see the git log.
13 require_once(CONST_LibDir.'/Result.php');
15 function mkRankedResult($iId, $iResultRank)
17 $oResult = new Result($iId);
18 $oResult->iResultRank = $iResultRank;
24 class ResultTest extends \PHPUnit\Framework\TestCase
26 public function testSplitResults()
28 $aSplitResults = Result::splitResults(array(
37 $aHead = array_keys($aSplitResults['head']);
38 $aTail = array_keys($aSplitResults['tail']);
40 $this->assertEquals($aHead, array(2, 3));
41 $this->assertEquals($aTail, array(1, 4, 5));