diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test.php | 24 | ||||
-rw-r--r-- | tests/test_array/code.php | 18 | ||||
-rw-r--r-- | tests/test_blocks/code.php | 2 | ||||
-rw-r--r-- | tests/test_closure/code.php | 2 | ||||
-rw-r--r-- | tests/test_escapes/code.php | 6 | ||||
-rw-r--r-- | tests/test_foreach/code.php | 10 | ||||
-rw-r--r-- | tests/test_getset/code.php | 2 | ||||
-rw-r--r-- | tests/test_loop/code.php | 2 | ||||
-rw-r--r-- | tests/test_mktag/code.php | 2 | ||||
-rw-r--r-- | tests/test_pseudotags/code.php | 2 | ||||
-rw-r--r-- | tests/test_recursive/code.php | 2 | ||||
-rw-r--r-- | tests/test_scoping/code.php | 2 | ||||
-rw-r--r-- | tests/test_short/code.php | 2 | ||||
-rw-r--r-- | tests/test_simple/code.php | 2 |
14 files changed, 39 insertions, 39 deletions
diff --git a/tests/test.php b/tests/test.php index ed45d3e..fcfac0e 100644 --- a/tests/test.php +++ b/tests/test.php @@ -6,18 +6,18 @@ require("code.php"); use \kch42\ste; class TestStorage implements ste\StorageAccess { - public function load($tpl, &$mode) { - $mode = ste\StorageAccess::MODE_SOURCE; - return file_get_contents($tpl); - } - - public function save($tpl, $data, $mode) { - if($mode != ste\StorageAccess::MODE_TRANSCOMPILED) { - return; - } - - file_put_contents("$tpl.transc.php", $data); - } + public function load($tpl, &$mode) { + $mode = ste\StorageAccess::MODE_SOURCE; + return file_get_contents($tpl); + } + + public function save($tpl, $data, $mode) { + if($mode != ste\StorageAccess::MODE_TRANSCOMPILED) { + return; + } + + file_put_contents("$tpl.transc.php", $data); + } } $ste = new ste\STECore(new TestStorage()); diff --git a/tests/test_array/code.php b/tests/test_array/code.php index 58601e2..1e02e20 100644 --- a/tests/test_array/code.php +++ b/tests/test_array/code.php @@ -1,13 +1,13 @@ <?php function test_func($ste) { - $ste->vars["foo"] = array( - "a" => array( - "blabla" => "OK" - ), - "b" => "bla" - ); - $ste->vars["bar"] = array( - "baz" => "a" - ); + $ste->vars["foo"] = array( + "a" => array( + "blabla" => "OK" + ), + "b" => "bla" + ); + $ste->vars["bar"] = array( + "baz" => "a" + ); } diff --git a/tests/test_blocks/code.php b/tests/test_blocks/code.php index de8c553..2e68d2d 100644 --- a/tests/test_blocks/code.php +++ b/tests/test_blocks/code.php @@ -1,5 +1,5 @@ <?php function test_func($ste) { - + } diff --git a/tests/test_closure/code.php b/tests/test_closure/code.php index de8c553..2e68d2d 100644 --- a/tests/test_closure/code.php +++ b/tests/test_closure/code.php @@ -1,5 +1,5 @@ <?php function test_func($ste) { - + } diff --git a/tests/test_escapes/code.php b/tests/test_escapes/code.php index 05984d1..d1a64c7 100644 --- a/tests/test_escapes/code.php +++ b/tests/test_escapes/code.php @@ -1,7 +1,7 @@ <?php function test_func($ste) { - $ste->register_tag("my_echo", function($ste, $params, $sub) { - return $params["text"]; - }); + $ste->register_tag("my_echo", function($ste, $params, $sub) { + return $params["text"]; + }); } diff --git a/tests/test_foreach/code.php b/tests/test_foreach/code.php index 380ee69..1dc5ab9 100644 --- a/tests/test_foreach/code.php +++ b/tests/test_foreach/code.php @@ -1,9 +1,9 @@ <?php function test_func($ste) { - $ste->vars["foo"] = array( - "a" => array("a" => 100, "b" => 200), - "b" => array("a" => 1, "b" => 2), - "c" => array("a" => 42, "b" => 1337) - ); + $ste->vars["foo"] = array( + "a" => array("a" => 100, "b" => 200), + "b" => array("a" => 1, "b" => 2), + "c" => array("a" => 42, "b" => 1337) + ); } diff --git a/tests/test_getset/code.php b/tests/test_getset/code.php index 19a7ecd..398686b 100644 --- a/tests/test_getset/code.php +++ b/tests/test_getset/code.php @@ -1,5 +1,5 @@ <?php function test_func($ste) { - $ste->vars["foo"] = "bar"; + $ste->vars["foo"] = "bar"; } diff --git a/tests/test_loop/code.php b/tests/test_loop/code.php index de8c553..2e68d2d 100644 --- a/tests/test_loop/code.php +++ b/tests/test_loop/code.php @@ -1,5 +1,5 @@ <?php function test_func($ste) { - + } diff --git a/tests/test_mktag/code.php b/tests/test_mktag/code.php index de8c553..2e68d2d 100644 --- a/tests/test_mktag/code.php +++ b/tests/test_mktag/code.php @@ -1,5 +1,5 @@ <?php function test_func($ste) { - + } diff --git a/tests/test_pseudotags/code.php b/tests/test_pseudotags/code.php index de8c553..2e68d2d 100644 --- a/tests/test_pseudotags/code.php +++ b/tests/test_pseudotags/code.php @@ -1,5 +1,5 @@ <?php function test_func($ste) { - + } diff --git a/tests/test_recursive/code.php b/tests/test_recursive/code.php index 4ca3852..d897479 100644 --- a/tests/test_recursive/code.php +++ b/tests/test_recursive/code.php @@ -1,5 +1,5 @@ <?php function test_func($ste) { - $ste->mute_runtime_errors = false; + $ste->mute_runtime_errors = false; } diff --git a/tests/test_scoping/code.php b/tests/test_scoping/code.php index de8c553..2e68d2d 100644 --- a/tests/test_scoping/code.php +++ b/tests/test_scoping/code.php @@ -1,5 +1,5 @@ <?php function test_func($ste) { - + } diff --git a/tests/test_short/code.php b/tests/test_short/code.php index de8c553..2e68d2d 100644 --- a/tests/test_short/code.php +++ b/tests/test_short/code.php @@ -1,5 +1,5 @@ <?php function test_func($ste) { - + } diff --git a/tests/test_simple/code.php b/tests/test_simple/code.php index 4c0babc..e68faac 100644 --- a/tests/test_simple/code.php +++ b/tests/test_simple/code.php @@ -1,5 +1,5 @@ <?php function test_func($ste) { - $ste->vars["foo"] = "World"; + $ste->vars["foo"] = "World"; } |