summaryrefslogtreecommitdiff
path: root/tests/test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test.php')
-rw-r--r--tests/test.php12
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");