Skip to content
Snippets Groups Projects
Commit 832915d5 authored by Ghislain Loas's avatar Ghislain Loas Committed by Laurent
Browse files

fix 156612 : when discovering template folder name on local install, dirname...

fix 156612 : when discovering template folder name on local install, dirname is returning full path. Adding a call to basename on dirname to return only the dirname.
parent 77d1add1
Branches
Tags
1 merge request!4514fix 156612 : when discovering template folder name on local install, dirname...
Pipeline #18046 failed with stage
in 24 minutes and 23 seconds
......@@ -732,7 +732,7 @@ class Class_Template {
public function getFolder() : string {
return dirname((new ReflectionClass($this))->getFileName());
return basename(dirname((new ReflectionClass($this))->getFileName()));
}
......
......@@ -149,7 +149,6 @@ class MyBibAppTemplateOpacIndexWithUserAgentTest extends MyBibAppTemplateTestCas
Class_AdminVar::set('MYBIBAPP_TEMPLATE', 1);
Class_Profil::find(2)->beCurrentProfil();
$this->dispatch('/opac/index/index');
}
......@@ -168,7 +167,10 @@ class MyBibAppTemplateOpacIndexWithUserAgentTest extends MyBibAppTemplateTestCas
/** @test */
public function pageShouldLoadMyBibAppCss() {
$this->assertXPath('//head/link[contains(@href, "/library/templates/MyBibApp/Assets/css/mybibapp.css")]');
$this->assertXPath(sprintf('//head/link[@href="%s/library/templates/MyBibApp/Assets/css/mybibapp.css?v=%s"]',
BASE_URL,
Class_ScriptLoader::getInstance()->getCacheHash()),
$this->_response->getBody());
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment