|
@@ 44-54 (lines=11) @@
|
| 41 |
|
/** |
| 42 |
|
* Test that 'main' and 'Layout' templates are loaded from module |
| 43 |
|
*/ |
| 44 |
|
public function testFindTemplatesInModule() { |
| 45 |
|
$this->assertEquals( |
| 46 |
|
"$this->base/module/templates/Page.ss", |
| 47 |
|
$this->loader->findTemplate('Page', ['$default']) |
| 48 |
|
); |
| 49 |
|
|
| 50 |
|
$this->assertEquals( |
| 51 |
|
"$this->base/module/templates/Layout/Page.ss", |
| 52 |
|
$this->loader->findTemplate(['type' => 'Layout', 'Page'], ['$default']) |
| 53 |
|
); |
| 54 |
|
} |
| 55 |
|
|
| 56 |
|
public function testFindNestedThemeTemplates() { |
| 57 |
|
// Without including the theme this template cannot be found |
|
@@ 81-91 (lines=11) @@
|
| 78 |
|
/** |
| 79 |
|
* Test that 'main' and 'Layout' templates are loaded from set theme |
| 80 |
|
*/ |
| 81 |
|
public function testFindTemplatesInTheme() { |
| 82 |
|
$this->assertEquals( |
| 83 |
|
"$this->base/themes/theme/templates/Page.ss", |
| 84 |
|
$this->loader->findTemplate('Page', ['theme']) |
| 85 |
|
); |
| 86 |
|
|
| 87 |
|
$this->assertEquals( |
| 88 |
|
"$this->base/themes/theme/templates/Layout/Page.ss", |
| 89 |
|
$this->loader->findTemplate(['type' => 'Layout', 'Page'], ['theme']) |
| 90 |
|
); |
| 91 |
|
} |
| 92 |
|
|
| 93 |
|
/** |
| 94 |
|
* Test that 'main' and 'Layout' templates are loaded from project without a set theme |
|
@@ 120-130 (lines=11) @@
|
| 117 |
|
/** |
| 118 |
|
* Test that 'main' template is found in theme and 'Layout' is found in module |
| 119 |
|
*/ |
| 120 |
|
public function testFindTemplatesMainThemeLayoutModule() { |
| 121 |
|
$this->assertEquals( |
| 122 |
|
"$this->base/themes/theme/templates/CustomThemePage.ss", |
| 123 |
|
$this->loader->findTemplate('CustomThemePage', ['theme', '$default']) |
| 124 |
|
); |
| 125 |
|
|
| 126 |
|
$this->assertEquals( |
| 127 |
|
"$this->base/module/templates/Layout/CustomThemePage.ss", |
| 128 |
|
$this->loader->findTemplate(['type' => 'Layout', 'CustomThemePage'], ['theme', '$default']) |
| 129 |
|
); |
| 130 |
|
} |
| 131 |
|
|
| 132 |
|
public function testFindThemedCSS() { |
| 133 |
|
$this->assertEquals( |