diff --git a/Backend/design/html/header_notice_bar_banner.tpl b/Backend/design/html/header_notice_bar_banner.tpl index c575fb3..57b96bd 100644 --- a/Backend/design/html/header_notice_bar_banner.tpl +++ b/Backend/design/html/header_notice_bar_banner.tpl @@ -34,7 +34,7 @@ {if $smarty.get.return} - + {include file='svg_icon.tpl' svgId='return'} {$btr->general_back|escape} diff --git a/Init/module.json b/Init/module.json index 5bea648..739dc8d 100644 --- a/Init/module.json +++ b/Init/module.json @@ -1,6 +1,6 @@ { "Okay": "4.5.3", - "version": "1.0.7", + "version": "1.0.8", "moduleName": "Header Notice Bar", "vendor": { "email": "devsviat@proton.me", diff --git a/tests/BackLinkTest.php b/tests/BackLinkTest.php new file mode 100644 index 0000000..602489c --- /dev/null +++ b/tests/BackLinkTest.php @@ -0,0 +1,29 @@ +getFileName(), 2) + . '/design/html/header_notice_bar_banner.tpl'; + $source = (string) file_get_contents($template); + + preg_match_all('/href="\{\$smarty\.get\.return([^}]*)\}"/', $source, $matches); + + self::assertNotSame([], $matches[1], 'кнопки «Назад» з ?return= у шаблоні немає'); + foreach ($matches[1] as $modifiers) { + self::assertSame('|escape', $modifiers); + } + } +}