/** * Teste CopixTpl->getFilePath() avec un thème inexistant. * */ public function testGetFilePathUnknownTheme() { $tpl = new CopixTpl(); CopixTpl::setTheme('themenonexistant'); $this->assertFalse($tpl->getFilePath('copixtest|testtheme.tpl')); // N'existe pas $this->assertFalse($tpl->getFilePath('copixtest|testthemefr.tpl')); // N'existe pas $this->assertFalse($tpl->getFilePath('copixtest|testthemefrfr.tpl')); // N'existe pas $this->assertPathEquals($this->defaultDir . 'copixtest/testdefault.tpl', $tpl->getFilePath('copixtest|testdefault.tpl')); $this->assertPathEquals($this->defaultDir . 'copixtest/fr/testdefaultfr.tpl', $tpl->getFilePath('copixtest|testdefaultfr.tpl')); $this->assertPathEquals($this->defaultDir . 'copixtest/fr_FR/testdefaultfrfr.tpl', $tpl->getFilePath('copixtest|testdefaultfrfr.tpl')); $this->assertPathEquals($this->moduleDir . 'testmodule.tpl', $tpl->getFilePath('copixtest|testmodule.tpl')); $this->assertPathEquals($this->moduleDir . 'fr/testmodulefr.tpl', $tpl->getFilePath('copixtest|testmodulefr.tpl')); $this->assertPathEquals($this->moduleDir . 'fr_FR/testmodulefrfr.tpl', $tpl->getFilePath('copixtest|testmodulefrfr.tpl')); $this->assertPathEquals($this->defaultDir . 'copixtest/testmoduleoverload.tpl', $tpl->getFilePath('copixtest|testmoduleoverload.tpl')); }