diff options
author | Kevin Chabowski <kevin@kch42.de> | 2014-05-24 01:54:04 +0200 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2014-05-24 01:54:04 +0200 |
commit | f7ddc264d832d163494904da67ca96856335487b (patch) | |
tree | 68e1b25d4799a966242150082a9ff3a12832b561 /tests/test.php | |
parent | 84d815f4e006e02521759070bb89025dab80b219 (diff) | |
download | ste-f7ddc264d832d163494904da67ca96856335487b.tar.gz ste-f7ddc264d832d163494904da67ca96856335487b.tar.bz2 ste-f7ddc264d832d163494904da67ca96856335487b.zip |
Simple autoloader for examples and tests.
Diffstat (limited to 'tests/test.php')
-rw-r--r-- | tests/test.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/test.php b/tests/test.php index 79fb69d..ed45d3e 100644 --- a/tests/test.php +++ b/tests/test.php @@ -1,16 +1,18 @@ <?php -require(dirname(__FILE__) . "/../ste.php"); +require(dirname(__FILE__) . "/../steloader.php"); require("code.php"); -class TestStorage implements \ste\StorageAccess { +use \kch42\ste; + +class TestStorage implements ste\StorageAccess { public function load($tpl, &$mode) { - $mode = \ste\MODE_SOURCE; + $mode = ste\StorageAccess::MODE_SOURCE; return file_get_contents($tpl); } public function save($tpl, $data, $mode) { - if($mode != \ste\MODE_TRANSCOMPILED) { + if($mode != ste\StorageAccess::MODE_TRANSCOMPILED) { return; } @@ -18,7 +20,7 @@ class TestStorage implements \ste\StorageAccess { } } -$ste = new \ste\STECore(new TestStorage()); +$ste = new ste\STECore(new TestStorage()); $ste->mute_runtime_errors = false; test_func($ste); echo $ste->exectemplate("test.tpl"); |