Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reservation list tests #3062

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions module/Finna/src/Finna/View/Helper/Root/ReservationList.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
use Finna\ReservationList\ReservationListService;
use VuFind\Auth\ILSAuthenticator;
use VuFind\Db\Entity\UserEntityInterface;
use VuFind\RecordDriver\DefaultRecord;
use VuFind\RecordDriver\AbstractBase;

use function in_array;
use function is_string;
Expand Down Expand Up @@ -122,11 +122,11 @@ protected function ensureListKeys(array $list): array
/**
* Get associative array of [institution => configured lists] where driver matches
*
* @param DefaultRecord $driver Record driver
* @param AbstractBase $driver Record driver
*
* @return array
*/
protected function getAvailableListsForRecord(DefaultRecord $driver): array
protected function getAvailableListsForRecord(AbstractBase $driver): array
{
$datasource = $driver->tryMethod('getDatasource');
if (!$datasource) {
Expand Down Expand Up @@ -227,11 +227,11 @@ public function checkUserRightsForList(array $list): bool
* Display buttons which routes the request to proper list procedures
* Checks if the list should be displayed for logged-in only users.
*
* @param DefaultRecord $driver Driver to use for checking available lists
* @param AbstractBase $driver Driver to use for checking available lists
*
* @return string
*/
public function renderReserveTemplate(DefaultRecord $driver): string
public function renderReserveTemplate(AbstractBase $driver): string
{
if (!$this->isFunctionalityEnabled()) {
return '';
Expand Down Expand Up @@ -260,11 +260,11 @@ public function getReservationListsForUser(): array
/**
* Get lists containing record
*
* @param DefaultRecord $record Record
* @param AbstractBase $record Record
*
* @return FinnaResourceListEntityInterface[]
*/
public function getListsContainingRecord(DefaultRecord $record): array
public function getListsContainingRecord(AbstractBase $record): array
{
if (!$this->isFunctionalityEnabled() || !$this->user) {
return [];
Expand Down
Loading
Loading