Skip to content

Commit

Permalink
Fix check for getUrlsForRecord to include the record id for MultiBack…
Browse files Browse the repository at this point in the history
…end support. (vufind-org#2858)
  • Loading branch information
EreMaijala authored Apr 27, 2023
1 parent 34157f4 commit 8a423fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,8 @@ public function getRealTimeTitleHold()
*/
public function getURLs()
{
return $this->hasILS() && $this->ils->checkCapability('getUrlsForRecord')
$params = [$this->getUniqueId()];
return $this->hasILS() && $this->ils->checkCapability('getUrlsForRecord', $params)
? $this->ils->getUrlsForRecord($this->getUniqueId())
: [];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,13 @@ protected function getMockDriverFromFixture(string $fixture): SolrMarc
{
$record = new \VuFind\Marc\MarcReader($this->getFixture($fixture));
$obj = $this->getMockBuilder(SolrMarc::class)
->onlyMethods(['getMarcReader'])->getMock();
->onlyMethods(['getMarcReader', 'getUniqueId'])->getMock();
$obj->expects($this->any())
->method('getMarcReader')
->will($this->returnValue($record));
$obj->expects($this->any())
->method('getUniqueId')
->will($this->returnValue('123'));
return $obj;
}

Expand Down

0 comments on commit 8a423fa

Please sign in to comment.