Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
demiankatz committed Jan 28, 2025
1 parent fce7069 commit 41c6f8b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
use Laminas\View\Helper\EscapeHtmlAttr;
use VuFind\Escaper\Escaper;
use VuFind\View\Helper\Root\Icon;
use VuFindTheme\View\Helper\AssetPipeline;
use VuFindTheme\View\Helper\ImageLink;

/**
Expand Down Expand Up @@ -137,6 +138,7 @@ protected function getIconHelper(
);
$plugins = array_merge(
[
'assetPipeline' => $this->createMock(AssetPipeline::class),
'escapeHtmlAttr' => new EscapeHtmlAttr($escaper),
],
$plugins
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ protected function getViewHelpers($container): array
});
$record->setDbServiceManager($serviceManager);
return [
'assetPipeline' => new \VuFindTheme\View\Helper\AssetPipeline(),
'auth' => new \VuFind\View\Helper\Root\Auth(
$this->createMock(\VuFind\Auth\Manager::class),
$this->createMock(\VuFind\Auth\ILSAuthenticator::class)
Expand Down
4 changes: 3 additions & 1 deletion themes/root/templates/Helpers/icons/font.phtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php
$this->assetPipeline()->appendStylesheet($this->src);
if ($this->src) {
$this->assetPipeline()->appendStylesheet($this->src);
}
$className = trim('icon icon--font ' . $this->icon . ' ' . ($this->extra['class'] ?? ''));
?>
<span class="<?=$this->escapeHtmlAttr($className) ?>"<?=$this->attrs ?> role="img" aria-hidden="true"></span>

0 comments on commit 41c6f8b

Please sign in to comment.