summaryrefslogtreecommitdiff
path: root/core/tests/Theme_Test.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/tests/Theme_Test.php')
-rw-r--r--core/tests/Theme_Test.php20
1 files changed, 13 insertions, 7 deletions
diff --git a/core/tests/Theme_Test.php b/core/tests/Theme_Test.php
index 5b568b19..f73a98eb 100644
--- a/core/tests/Theme_Test.php
+++ b/core/tests/Theme_Test.php
@@ -19,16 +19,22 @@
*/
class Theme_Test extends Unit_Test_Case {
- public function teardown() {
- theme::$debug_backtrace = "debug_backtrace";
+ public function url_test() {
+ $theme = new Theme("fake_theme");
+ $this->assert_equal("http://./themes/fake_theme/file", $theme->url("file"));
}
- public function url_test() {
- theme::$debug_backtrace = array("Theme_Test", "_fake_debug_backtrace");
- $this->assert_equal("http://./themes/fake_theme/file", theme::url("file"));
+ public function display_test() {
+ $theme = new Theme("fake_theme");
+ $view = $theme->display("test_page", "Theme_Test_Mock_View");
+ $this->assert_equal("test_page", $view->page_name);
}
+}
+
+class Theme_Test_Mock_View {
+ public $page_name = null;
- public function _fake_debug_backtrace() {
- return array(array(), array('file' => THEMEPATH . "fake_theme/views/some_file.html.php"));
+ public function __construct($page_name) {
+ $this->page_name = $page_name;
}
} \ No newline at end of file