summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2020-04-26 16:48:01 +0200
committerLaria Carolin Chabowski <laria@laria.me>2020-04-26 16:48:01 +0200
commitbfd4763b4f831ed9eccbdd4717c98b7d95999d2e (patch)
tree73538562b347386a24e3b81f443a0b61309fe3de /tests
parent2464ac4fa63ccd169f36849a1f7372191066f305 (diff)
downloadste-bfd4763b4f831ed9eccbdd4717c98b7d95999d2e.tar.gz
ste-bfd4763b4f831ed9eccbdd4717c98b7d95999d2e.tar.bz2
ste-bfd4763b4f831ed9eccbdd4717c98b7d95999d2e.zip
Some simple code formatting
- Expand tabs into spaces - Remove trailing whitespace - Get rid of closing `?>` tags
Diffstat (limited to 'tests')
-rw-r--r--tests/test.php24
-rw-r--r--tests/test_array/code.php18
-rw-r--r--tests/test_blocks/code.php2
-rw-r--r--tests/test_closure/code.php2
-rw-r--r--tests/test_escapes/code.php6
-rw-r--r--tests/test_foreach/code.php10
-rw-r--r--tests/test_getset/code.php2
-rw-r--r--tests/test_loop/code.php2
-rw-r--r--tests/test_mktag/code.php2
-rw-r--r--tests/test_pseudotags/code.php2
-rw-r--r--tests/test_recursive/code.php2
-rw-r--r--tests/test_scoping/code.php2
-rw-r--r--tests/test_short/code.php2
-rw-r--r--tests/test_simple/code.php2
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";
}