diff --git a/module/VuFind/src/VuFindTest/Search/TestHarness/Results.php b/module/VuFind/src/VuFindTest/Search/TestHarness/Results.php index 473d3fef7f4b8a303f8823e35369d0694ed599fa..5618e68a0bf221bb2ed1e811177401fb2ee29cd3 100644 --- a/module/VuFind/src/VuFindTest/Search/TestHarness/Results.php +++ b/module/VuFind/src/VuFindTest/Search/TestHarness/Results.php @@ -55,18 +55,27 @@ class Results extends \VuFind\Search\Base\Results */ protected $driverCache = []; + /** + * Fake facet response + * + * @var array + */ + protected $facets; + /** * Constructor * * @param \VuFind\Search\Base\Params $params Object representing user search * parameters. * @param int $total Total result set size to simulate + * @param array $facets Facet response (optional) */ - public function __construct(Params $params, $total = 100) + public function __construct(Params $params, $total = 100, $facets = []) { parent::__construct($params); $this->fakeExpectedTotal = $total; $this->searchId = 'fake'; // fill a fake value here so we don't hit the DB + $this->facets = $facets; } /** @@ -79,8 +88,7 @@ class Results extends \VuFind\Search\Base\Results */ public function getFacetList($filter = null) { - // not supported - return []; + return $this->facets; } /**