summaryrefslogtreecommitdiff
path: root/tests/test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test.php')
-rw-r--r--tests/test.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test.php b/tests/test.php
index ed45d3e..f051d94 100644
--- a/tests/test.php
+++ b/tests/test.php
@@ -1,10 +1,15 @@
<?php
require(dirname(__FILE__) . "/../steloader.php");
-require("code.php");
use \kch42\ste;
+$ste_initializer = function($sa) {
+ return new ste\STECore($sa);
+};
+
+require("code.php");
+
class TestStorage implements ste\StorageAccess {
public function load($tpl, &$mode) {
$mode = ste\StorageAccess::MODE_SOURCE;
@@ -20,7 +25,7 @@ class TestStorage implements ste\StorageAccess {
}
}
-$ste = new ste\STECore(new TestStorage());
+$ste = $ste_initializer(new TestStorage());
$ste->mute_runtime_errors = false;
test_func($ste);
echo $ste->exectemplate("test.tpl");