summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test.php11
-rw-r--r--tests/test_array/code.php3
-rw-r--r--tests/test_blocks/code.php4
-rw-r--r--tests/test_closure/code.php4
-rw-r--r--tests/test_escapes/code.php5
-rw-r--r--tests/test_foreach/code.php3
-rw-r--r--tests/test_getset/code.php3
-rw-r--r--tests/test_loop/code.php4
-rw-r--r--tests/test_mktag/code.php4
-rw-r--r--tests/test_pseudotags/code.php4
-rw-r--r--tests/test_recursive/code.php3
-rw-r--r--tests/test_scoping/code.php4
-rw-r--r--tests/test_short/code.php4
-rw-r--r--tests/test_simple/code.php3
-rw-r--r--tests/test_tagname/code.php8
15 files changed, 39 insertions, 28 deletions
diff --git a/tests/test.php b/tests/test.php
index fcfac0e..15453b0 100644
--- a/tests/test.php
+++ b/tests/test.php
@@ -5,14 +5,17 @@ require("code.php");
use \kch42\ste;
-class TestStorage implements ste\StorageAccess {
- public function load($tpl, &$mode) {
+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) {
+ public function save($tpl, $data, $mode)
+ {
+ if ($mode != ste\StorageAccess::MODE_TRANSCOMPILED) {
return;
}
diff --git a/tests/test_array/code.php b/tests/test_array/code.php
index 1e02e20..b524c15 100644
--- a/tests/test_array/code.php
+++ b/tests/test_array/code.php
@@ -1,6 +1,7 @@
<?php
-function test_func($ste) {
+function test_func($ste)
+{
$ste->vars["foo"] = array(
"a" => array(
"blabla" => "OK"
diff --git a/tests/test_blocks/code.php b/tests/test_blocks/code.php
index 2e68d2d..25e7f00 100644
--- a/tests/test_blocks/code.php
+++ b/tests/test_blocks/code.php
@@ -1,5 +1,5 @@
<?php
-function test_func($ste) {
-
+function test_func($ste)
+{
}
diff --git a/tests/test_closure/code.php b/tests/test_closure/code.php
index 2e68d2d..25e7f00 100644
--- a/tests/test_closure/code.php
+++ b/tests/test_closure/code.php
@@ -1,5 +1,5 @@
<?php
-function test_func($ste) {
-
+function test_func($ste)
+{
}
diff --git a/tests/test_escapes/code.php b/tests/test_escapes/code.php
index d1a64c7..a1904c8 100644
--- a/tests/test_escapes/code.php
+++ b/tests/test_escapes/code.php
@@ -1,7 +1,8 @@
<?php
-function test_func($ste) {
- $ste->register_tag("my_echo", function($ste, $params, $sub) {
+function test_func($ste)
+{
+ $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 1dc5ab9..60ad311 100644
--- a/tests/test_foreach/code.php
+++ b/tests/test_foreach/code.php
@@ -1,6 +1,7 @@
<?php
-function test_func($ste) {
+function test_func($ste)
+{
$ste->vars["foo"] = array(
"a" => array("a" => 100, "b" => 200),
"b" => array("a" => 1, "b" => 2),
diff --git a/tests/test_getset/code.php b/tests/test_getset/code.php
index 398686b..722af1e 100644
--- a/tests/test_getset/code.php
+++ b/tests/test_getset/code.php
@@ -1,5 +1,6 @@
<?php
-function test_func($ste) {
+function test_func($ste)
+{
$ste->vars["foo"] = "bar";
}
diff --git a/tests/test_loop/code.php b/tests/test_loop/code.php
index 2e68d2d..25e7f00 100644
--- a/tests/test_loop/code.php
+++ b/tests/test_loop/code.php
@@ -1,5 +1,5 @@
<?php
-function test_func($ste) {
-
+function test_func($ste)
+{
}
diff --git a/tests/test_mktag/code.php b/tests/test_mktag/code.php
index 2e68d2d..25e7f00 100644
--- a/tests/test_mktag/code.php
+++ b/tests/test_mktag/code.php
@@ -1,5 +1,5 @@
<?php
-function test_func($ste) {
-
+function test_func($ste)
+{
}
diff --git a/tests/test_pseudotags/code.php b/tests/test_pseudotags/code.php
index 2e68d2d..25e7f00 100644
--- a/tests/test_pseudotags/code.php
+++ b/tests/test_pseudotags/code.php
@@ -1,5 +1,5 @@
<?php
-function test_func($ste) {
-
+function test_func($ste)
+{
}
diff --git a/tests/test_recursive/code.php b/tests/test_recursive/code.php
index d897479..96b967b 100644
--- a/tests/test_recursive/code.php
+++ b/tests/test_recursive/code.php
@@ -1,5 +1,6 @@
<?php
-function test_func($ste) {
+function test_func($ste)
+{
$ste->mute_runtime_errors = false;
}
diff --git a/tests/test_scoping/code.php b/tests/test_scoping/code.php
index 2e68d2d..25e7f00 100644
--- a/tests/test_scoping/code.php
+++ b/tests/test_scoping/code.php
@@ -1,5 +1,5 @@
<?php
-function test_func($ste) {
-
+function test_func($ste)
+{
}
diff --git a/tests/test_short/code.php b/tests/test_short/code.php
index 2e68d2d..25e7f00 100644
--- a/tests/test_short/code.php
+++ b/tests/test_short/code.php
@@ -1,5 +1,5 @@
<?php
-function test_func($ste) {
-
+function test_func($ste)
+{
}
diff --git a/tests/test_simple/code.php b/tests/test_simple/code.php
index e68faac..2712e2b 100644
--- a/tests/test_simple/code.php
+++ b/tests/test_simple/code.php
@@ -1,5 +1,6 @@
<?php
-function test_func($ste) {
+function test_func($ste)
+{
$ste->vars["foo"] = "World";
}
diff --git a/tests/test_tagname/code.php b/tests/test_tagname/code.php
index 6001358..e934989 100644
--- a/tests/test_tagname/code.php
+++ b/tests/test_tagname/code.php
@@ -2,7 +2,8 @@
use kch42\ste\STECore;
-function test_func(STECore $ste) {
+function test_func(STECore $ste)
+{
$names = array(
"foo",
"ab_cd",
@@ -13,8 +14,9 @@ function test_func(STECore $ste) {
foreach ($names as $name) {
$ste->register_tag(
$name,
- function ($ste, $params, $sub) use ($name) { return $name; }
+ function ($ste, $params, $sub) use ($name) {
+ return $name;
+ }
);
}
-
}