summaryrefslogtreecommitdiff
path: root/Zend/tests/traits
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/traits')
-rw-r--r--Zend/tests/traits/bug54441.phpt2
-rw-r--r--Zend/tests/traits/bug55214.phpt4
-rw-r--r--Zend/tests/traits/bug55355.phpt2
-rw-r--r--Zend/tests/traits/bug55424.phpt2
-rw-r--r--Zend/tests/traits/bug55554b.phpt4
-rw-r--r--Zend/tests/traits/bug55554c.phpt2
-rw-r--r--Zend/tests/traits/bug55554f.phpt2
-rw-r--r--Zend/tests/traits/bug55554g.phpt2
-rw-r--r--Zend/tests/traits/bug60717.phpt10
-rw-r--r--Zend/tests/traits/bug61998.phpt4
-rw-r--r--Zend/tests/traits/bug74607.phpt12
-rw-r--r--Zend/tests/traits/bug74607a.phpt12
-rw-r--r--Zend/tests/traits/bug75607a.phpt2
-rw-r--r--Zend/tests/traits/bugs/abstract-methods01.phpt4
-rw-r--r--Zend/tests/traits/bugs/abstract-methods02.phpt2
-rw-r--r--Zend/tests/traits/bugs/abstract-methods03.phpt2
-rw-r--r--Zend/tests/traits/bugs/abstract-methods04.phpt8
-rw-r--r--Zend/tests/traits/bugs/abstract-methods05.phpt4
-rw-r--r--Zend/tests/traits/bugs/abstract-methods06.phpt4
-rw-r--r--Zend/tests/traits/bugs/alias-semantics.phpt2
-rw-r--r--Zend/tests/traits/bugs/alias-semantics02.phpt2
-rw-r--r--Zend/tests/traits/bugs/alias01.phpt2
-rw-r--r--Zend/tests/traits/bugs/interfaces.phpt2
-rw-r--r--Zend/tests/traits/bugs/missing-trait.phpt2
-rw-r--r--Zend/tests/traits/bugs/overridding-conflicting-methods.phpt2
-rw-r--r--Zend/tests/traits/bugs/overridding-conflicting-property-initializer.phpt2
-rw-r--r--Zend/tests/traits/conflict001.phpt2
-rw-r--r--Zend/tests/traits/conflict002.phpt2
-rw-r--r--Zend/tests/traits/conflict003.phpt2
-rw-r--r--Zend/tests/traits/error_001.phpt2
-rw-r--r--Zend/tests/traits/error_003.phpt2
-rw-r--r--Zend/tests/traits/error_004.phpt2
-rw-r--r--Zend/tests/traits/error_005.phpt2
-rw-r--r--Zend/tests/traits/error_006.phpt2
-rw-r--r--Zend/tests/traits/error_007.phpt2
-rw-r--r--Zend/tests/traits/flattening001.phpt2
-rw-r--r--Zend/tests/traits/flattening002.phpt6
-rw-r--r--Zend/tests/traits/flattening003.phpt2
-rw-r--r--Zend/tests/traits/inheritance001.phpt2
-rw-r--r--Zend/tests/traits/inheritance002.phpt4
-rw-r--r--Zend/tests/traits/inheritance003.phpt2
-rw-r--r--Zend/tests/traits/language001.phpt2
-rw-r--r--Zend/tests/traits/language002.phpt6
-rw-r--r--Zend/tests/traits/language003.phpt6
-rw-r--r--Zend/tests/traits/language004.phpt6
-rw-r--r--Zend/tests/traits/language005.phpt4
-rw-r--r--Zend/tests/traits/language006.phpt2
-rw-r--r--Zend/tests/traits/language007.phpt2
-rw-r--r--Zend/tests/traits/language008a.phpt2
-rw-r--r--Zend/tests/traits/language008b.phpt2
-rw-r--r--Zend/tests/traits/language009.phpt4
-rw-r--r--Zend/tests/traits/language010.phpt2
-rw-r--r--Zend/tests/traits/language011.phpt2
-rw-r--r--Zend/tests/traits/language012.phpt2
-rw-r--r--Zend/tests/traits/language013.phpt2
-rw-r--r--Zend/tests/traits/language014.phpt2
-rw-r--r--Zend/tests/traits/methods_001.phpt8
-rw-r--r--Zend/tests/traits/methods_002.phpt2
-rw-r--r--Zend/tests/traits/methods_003.phpt2
-rw-r--r--Zend/tests/traits/property001.phpt2
-rw-r--r--Zend/tests/traits/property002.phpt2
-rw-r--r--Zend/tests/traits/property003.phpt2
-rw-r--r--Zend/tests/traits/property004.phpt2
-rw-r--r--Zend/tests/traits/property005.phpt4
-rw-r--r--Zend/tests/traits/property006.phpt4
-rw-r--r--Zend/tests/traits/property007.phpt4
-rw-r--r--Zend/tests/traits/property008.phpt2
-rw-r--r--Zend/tests/traits/trait_constant_001.phpt2
-rw-r--r--Zend/tests/traits/trait_constant_002.phpt4
69 files changed, 110 insertions, 110 deletions
diff --git a/Zend/tests/traits/bug54441.phpt b/Zend/tests/traits/bug54441.phpt
index 3fe688b3b1..bb83d12299 100644
--- a/Zend/tests/traits/bug54441.phpt
+++ b/Zend/tests/traits/bug54441.phpt
@@ -9,7 +9,7 @@ trait Foo {
class Boo {
use Foo {
- bar as dontKnow;
+ bar as dontKnow;
dontKnow as protected;
}
}
diff --git a/Zend/tests/traits/bug55214.phpt b/Zend/tests/traits/bug55214.phpt
index 890fc3792c..b27ae02428 100644
--- a/Zend/tests/traits/bug55214.phpt
+++ b/Zend/tests/traits/bug55214.phpt
@@ -10,7 +10,7 @@ trait ATrait {
public static function get_class_name() {
return __CLASS__;
}
-
+
public function get_class_name_obj() {
return __CLASS__;
}
@@ -18,7 +18,7 @@ trait ATrait {
public static function get_class_name2() {
return self::$static_var;
}
-
+
public function get_class_name_obj2() {
return $this->var;
}
diff --git a/Zend/tests/traits/bug55355.phpt b/Zend/tests/traits/bug55355.phpt
index 301ceeeb09..22350a281f 100644
--- a/Zend/tests/traits/bug55355.phpt
+++ b/Zend/tests/traits/bug55355.phpt
@@ -8,7 +8,7 @@ trait ATrait {
function bar() {
$this->foo();
}
- abstract function foo();
+ abstract function foo();
}
// A class on the second level in the
diff --git a/Zend/tests/traits/bug55424.phpt b/Zend/tests/traits/bug55424.phpt
index b6c3b54515..b1fdc8c353 100644
--- a/Zend/tests/traits/bug55424.phpt
+++ b/Zend/tests/traits/bug55424.phpt
@@ -11,7 +11,7 @@ Bug #55424 (Method got missing from class when a trait defined an abstract metho
}
abstract function setAttribute();
- }
+ }
class Base
{
diff --git a/Zend/tests/traits/bug55554b.phpt b/Zend/tests/traits/bug55554b.phpt
index 06229bac34..cf2eadf2f8 100644
--- a/Zend/tests/traits/bug55554b.phpt
+++ b/Zend/tests/traits/bug55554b.phpt
@@ -16,7 +16,7 @@ class OverridingIsSilent1 {
use TConstructor {
foo as __construct;
}
-
+
public function __construct() {
echo "OverridingIsSilent1 __construct\n";
}
@@ -28,7 +28,7 @@ class OverridingIsSilent2 {
use TConstructor {
foo as OverridingIsSilent2;
}
-
+
public function OverridingIsSilent2() {
echo "OverridingIsSilent2 OverridingIsSilent2\n";
}
diff --git a/Zend/tests/traits/bug55554c.phpt b/Zend/tests/traits/bug55554c.phpt
index e1195ce883..ff6f37d3c2 100644
--- a/Zend/tests/traits/bug55554c.phpt
+++ b/Zend/tests/traits/bug55554c.phpt
@@ -28,7 +28,7 @@ trait TC2 {
class ReportCollision {
use TC1, TC2;
-
+
public function __construct() {
echo "New constructor executed\n";
}
diff --git a/Zend/tests/traits/bug55554f.phpt b/Zend/tests/traits/bug55554f.phpt
index 34b327d305..31f5f534c5 100644
--- a/Zend/tests/traits/bug55554f.phpt
+++ b/Zend/tests/traits/bug55554f.phpt
@@ -14,7 +14,7 @@ trait TNew {
class ReportCollision {
use TNew;
-
+
public function ReportCollision() {
echo "ReportCollision executed\n";
}
diff --git a/Zend/tests/traits/bug55554g.phpt b/Zend/tests/traits/bug55554g.phpt
index 22d269603e..662140cec0 100644
--- a/Zend/tests/traits/bug55554g.phpt
+++ b/Zend/tests/traits/bug55554g.phpt
@@ -14,7 +14,7 @@ trait TLegacy {
class ReportCollision {
use TLegacy;
-
+
public function __construct() {
echo "ReportCollision executed\n";
}
diff --git a/Zend/tests/traits/bug60717.phpt b/Zend/tests/traits/bug60717.phpt
index bf3adb1c88..d4bf7ea6de 100644
--- a/Zend/tests/traits/bug60717.phpt
+++ b/Zend/tests/traits/bug60717.phpt
@@ -34,12 +34,12 @@ namespace HTML
{
use TextArea, HTMLAttributes, TextUTF8;
}
-
+
class HTMLHelper2 implements Helper
{
use TextArea, TextUTF8, HTMLAttributes;
}
-
+
class HTMLHelper3 implements Helper
{
use HTMLAttributes, TextArea, TextUTF8;
@@ -49,16 +49,16 @@ namespace HTML
{
use HTMLAttributes, TextUTF8, TextArea;
}
-
+
class HTMLHelper5 implements Helper
{
use TextUTF8, TextArea, HTMLAttributes;
}
-
+
class HTMLHelper6 implements Helper
{
use TextUTF8, HTMLAttributes, TextArea;
- }
+ }
$o = new HTMLHelper;
$o = new HTMLHelper2;
diff --git a/Zend/tests/traits/bug61998.phpt b/Zend/tests/traits/bug61998.phpt
index c5a3e60fbb..097073892f 100644
--- a/Zend/tests/traits/bug61998.phpt
+++ b/Zend/tests/traits/bug61998.phpt
@@ -12,7 +12,7 @@ class Foo {
}
}
-trait T1 {
+trait T1 {
public function func() {
echo "From T1\n";
}
@@ -39,7 +39,7 @@ class Bar {
}
}
-trait T2 {
+trait T2 {
public function func2() {
echo "From T2\n";
}
diff --git a/Zend/tests/traits/bug74607.phpt b/Zend/tests/traits/bug74607.phpt
index 6f158db7e2..12b0b376f0 100644
--- a/Zend/tests/traits/bug74607.phpt
+++ b/Zend/tests/traits/bug74607.phpt
@@ -3,16 +3,16 @@ Bug #74607 (Traits enforce different inheritance rules - return types)
--FILE--
<?php
-abstract class L1{
+abstract class L1{
abstract function m3($x);
-}
+}
-trait L2t{
+trait L2t{
function m3($x): int{}
-}
+}
-class L2 extends L1{
-use L2t;
+class L2 extends L1{
+use L2t;
}
echo "DONE";
diff --git a/Zend/tests/traits/bug74607a.phpt b/Zend/tests/traits/bug74607a.phpt
index efdced95c5..8ef3076fd6 100644
--- a/Zend/tests/traits/bug74607a.phpt
+++ b/Zend/tests/traits/bug74607a.phpt
@@ -3,16 +3,16 @@ Bug #74607 (Traits enforce different inheritance rules - number of required para
--FILE--
<?php
-abstract class L1{
+abstract class L1{
abstract function m3($x);
-}
+}
-trait L2t{
+trait L2t{
function m3($x, $y = 0){}
-}
+}
-class L2 extends L1{
-use L2t;
+class L2 extends L1{
+use L2t;
}
echo "DONE";
diff --git a/Zend/tests/traits/bug75607a.phpt b/Zend/tests/traits/bug75607a.phpt
index acf59186b6..12b555f728 100644
--- a/Zend/tests/traits/bug75607a.phpt
+++ b/Zend/tests/traits/bug75607a.phpt
@@ -20,7 +20,7 @@ class Base
class Child extends base
{
-
+
}
class Grand extends Child
diff --git a/Zend/tests/traits/bugs/abstract-methods01.phpt b/Zend/tests/traits/bugs/abstract-methods01.phpt
index 6275caa193..5b90ae0f3d 100644
--- a/Zend/tests/traits/bugs/abstract-methods01.phpt
+++ b/Zend/tests/traits/bugs/abstract-methods01.phpt
@@ -9,11 +9,11 @@ trait THello {
}
class TraitsTest {
- use THello;
+ use THello;
}
$test = new TraitsTest();
$test->hello();
?>
---EXPECTF--
+--EXPECTF--
Fatal error: Class %s contains %d abstract method and must therefore be declared abstract or implement the remaining methods (%s) in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/abstract-methods02.phpt b/Zend/tests/traits/bugs/abstract-methods02.phpt
index 25130c538b..626df3d6eb 100644
--- a/Zend/tests/traits/bugs/abstract-methods02.phpt
+++ b/Zend/tests/traits/bugs/abstract-methods02.phpt
@@ -22,5 +22,5 @@ class TraitsTest {
$test = new TraitsTest();
$test->hello();
?>
---EXPECT--
+--EXPECT--
Hello \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/abstract-methods03.phpt b/Zend/tests/traits/bugs/abstract-methods03.phpt
index 2a699d8df5..44746578e0 100644
--- a/Zend/tests/traits/bugs/abstract-methods03.phpt
+++ b/Zend/tests/traits/bugs/abstract-methods03.phpt
@@ -18,5 +18,5 @@ class TraitsTest {
$test = new TraitsTest();
$test->hello();
?>
---EXPECT--
+--EXPECT--
Hello \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/abstract-methods04.phpt b/Zend/tests/traits/bugs/abstract-methods04.phpt
index b3b5bfaca5..5cfc7d7d51 100644
--- a/Zend/tests/traits/bugs/abstract-methods04.phpt
+++ b/Zend/tests/traits/bugs/abstract-methods04.phpt
@@ -1,5 +1,5 @@
--TEST--
-Abstract Trait Methods should behave like common abstract methods and
+Abstract Trait Methods should behave like common abstract methods and
implementstion may be provided by other traits. Sorting order shouldn't influence result.
--FILE--
<?php
@@ -17,7 +17,7 @@ trait THelloImpl {
class TraitsTest1 {
use THello;
- use THelloImpl;
+ use THelloImpl;
}
$test = new TraitsTest1();
@@ -25,12 +25,12 @@ $test->hello();
class TraitsTest2 {
use THelloImpl;
- use THello;
+ use THello;
}
$test = new TraitsTest2();
$test->hello();
?>
---EXPECT--
+--EXPECT--
HelloHello \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/abstract-methods05.phpt b/Zend/tests/traits/bugs/abstract-methods05.phpt
index 839be75c2b..b40cbe30a6 100644
--- a/Zend/tests/traits/bugs/abstract-methods05.phpt
+++ b/Zend/tests/traits/bugs/abstract-methods05.phpt
@@ -16,10 +16,10 @@ trait THelloA {
class TraitsTest1 {
use THelloB;
- use THelloA;
+ use THelloA;
}
?>
---EXPECTF--
+--EXPECTF--
Fatal error: Declaration of THelloB::hello() must be compatible with THelloA::hello($a) in %s on line %d
diff --git a/Zend/tests/traits/bugs/abstract-methods06.phpt b/Zend/tests/traits/bugs/abstract-methods06.phpt
index 8569aefb38..d8d4994f66 100644
--- a/Zend/tests/traits/bugs/abstract-methods06.phpt
+++ b/Zend/tests/traits/bugs/abstract-methods06.phpt
@@ -7,7 +7,7 @@ error_reporting(E_ALL);
trait THelloB {
public function hello() {
echo 'Hello';
- }
+ }
}
trait THelloA {
@@ -22,5 +22,5 @@ class TraitsTest1 {
?>
---EXPECTF--
+--EXPECTF--
Fatal error: Declaration of THelloB::hello() must be compatible with THelloA::hello($a) in %s on line %d
diff --git a/Zend/tests/traits/bugs/alias-semantics.phpt b/Zend/tests/traits/bugs/alias-semantics.phpt
index 5e7965d6dc..a940ab0942 100644
--- a/Zend/tests/traits/bugs/alias-semantics.phpt
+++ b/Zend/tests/traits/bugs/alias-semantics.phpt
@@ -19,5 +19,5 @@ $test->a();
$test->b();
?>
---EXPECT--
+--EXPECT--
AA \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/alias-semantics02.phpt b/Zend/tests/traits/bugs/alias-semantics02.phpt
index 58faf9f290..5ce117ea76 100644
--- a/Zend/tests/traits/bugs/alias-semantics02.phpt
+++ b/Zend/tests/traits/bugs/alias-semantics02.phpt
@@ -21,5 +21,5 @@ $test->a();
$test->b();
?>
---EXPECT--
+--EXPECT--
AA \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/alias01.phpt b/Zend/tests/traits/bugs/alias01.phpt
index 4b89a54dda..e6c47858e5 100644
--- a/Zend/tests/traits/bugs/alias01.phpt
+++ b/Zend/tests/traits/bugs/alias01.phpt
@@ -7,7 +7,7 @@ trait T1 {
function m2() { echo "T:m2\n"; }
}
-class C1 {
+class C1 {
use T1 { m1 as a1; }
}
diff --git a/Zend/tests/traits/bugs/interfaces.phpt b/Zend/tests/traits/bugs/interfaces.phpt
index b632b73be2..97ec174a7f 100644
--- a/Zend/tests/traits/bugs/interfaces.phpt
+++ b/Zend/tests/traits/bugs/interfaces.phpt
@@ -15,5 +15,5 @@ trait THello implements MyInterface {
}
?>
---EXPECTF--
+--EXPECTF--
Parse error: syntax error, unexpected 'implements' (T_IMPLEMENTS), expecting '{' in %s on line %d
diff --git a/Zend/tests/traits/bugs/missing-trait.phpt b/Zend/tests/traits/bugs/missing-trait.phpt
index ce4fa5c69a..1cdd4f1cc6 100644
--- a/Zend/tests/traits/bugs/missing-trait.phpt
+++ b/Zend/tests/traits/bugs/missing-trait.phpt
@@ -11,5 +11,5 @@ class TraitsTest {
$test = new TraitsTest();
?>
---EXPECTF--
+--EXPECTF--
Fatal error: Trait 'THello' not found in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/overridding-conflicting-methods.phpt b/Zend/tests/traits/bugs/overridding-conflicting-methods.phpt
index 464d9783a4..9425b9215b 100644
--- a/Zend/tests/traits/bugs/overridding-conflicting-methods.phpt
+++ b/Zend/tests/traits/bugs/overridding-conflicting-methods.phpt
@@ -27,5 +27,5 @@ class TraitsTest {
$test = new TraitsTest();
$test->hello();
?>
---EXPECT--
+--EXPECT--
Hello \ No newline at end of file
diff --git a/Zend/tests/traits/bugs/overridding-conflicting-property-initializer.phpt b/Zend/tests/traits/bugs/overridding-conflicting-property-initializer.phpt
index 1b9d98dac0..b289651a9b 100644
--- a/Zend/tests/traits/bugs/overridding-conflicting-property-initializer.phpt
+++ b/Zend/tests/traits/bugs/overridding-conflicting-property-initializer.phpt
@@ -19,5 +19,5 @@ class baz
$obj = new baz();
echo $obj->zoo, "\n";
?>
---EXPECTF--
+--EXPECTF--
Fatal error: baz and foo define the same property ($zoo) in the composition of baz. However, the definition differs and is considered incompatible. Class was composed in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/conflict001.phpt b/Zend/tests/traits/conflict001.phpt
index 32346b3d92..dfc9456853 100644
--- a/Zend/tests/traits/conflict001.phpt
+++ b/Zend/tests/traits/conflict001.phpt
@@ -21,5 +21,5 @@ class TraitsTest {
use THello2;
}
?>
---EXPECTF--
+--EXPECTF--
Fatal error: Trait method hello has not been applied, because there are collisions with other trait methods on TraitsTest in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/conflict002.phpt b/Zend/tests/traits/conflict002.phpt
index ab913d8b05..a723639ee9 100644
--- a/Zend/tests/traits/conflict002.phpt
+++ b/Zend/tests/traits/conflict002.phpt
@@ -28,5 +28,5 @@ class TheWorldIsNotEnough {
$o = new TheWorldIsNotEnough();
$o->sayHello(); // echos Hello Universe!
?>
---EXPECT--
+--EXPECT--
Hello Universe! \ No newline at end of file
diff --git a/Zend/tests/traits/conflict003.phpt b/Zend/tests/traits/conflict003.phpt
index 0e71063f19..577f5c73c3 100644
--- a/Zend/tests/traits/conflict003.phpt
+++ b/Zend/tests/traits/conflict003.phpt
@@ -27,5 +27,5 @@ class Talker {
}
?>
---EXPECTF--
+--EXPECTF--
Fatal error: Trait method smallTalk has not been applied, because there are collisions with other trait methods on Talker in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/error_001.phpt b/Zend/tests/traits/error_001.phpt
index 307e5c128a..be4295a6d8 100644
--- a/Zend/tests/traits/error_001.phpt
+++ b/Zend/tests/traits/error_001.phpt
@@ -3,7 +3,7 @@ Trying to use instanceof for a method twice
--FILE--
<?php
-trait foo {
+trait foo {
public function foo() {
return 1;
}
diff --git a/Zend/tests/traits/error_003.phpt b/Zend/tests/traits/error_003.phpt
index 5122155bb3..23f62d2977 100644
--- a/Zend/tests/traits/error_003.phpt
+++ b/Zend/tests/traits/error_003.phpt
@@ -3,7 +3,7 @@ Trying to use an interface as trait
--FILE--
<?php
-interface abc {
+interface abc {
}
class A {
diff --git a/Zend/tests/traits/error_004.phpt b/Zend/tests/traits/error_004.phpt
index c7ac916116..5bfcc263cc 100644
--- a/Zend/tests/traits/error_004.phpt
+++ b/Zend/tests/traits/error_004.phpt
@@ -3,7 +3,7 @@ Trying to use a class as trait
--FILE--
<?php
-class abc {
+class abc {
}
class A {
diff --git a/Zend/tests/traits/error_005.phpt b/Zend/tests/traits/error_005.phpt
index 5aa5e10d95..99952f70e6 100644
--- a/Zend/tests/traits/error_005.phpt
+++ b/Zend/tests/traits/error_005.phpt
@@ -3,7 +3,7 @@ Trying to use a final class as trait
--FILE--
<?php
-final class abc {
+final class abc {
}
class A {
diff --git a/Zend/tests/traits/error_006.phpt b/Zend/tests/traits/error_006.phpt
index 0169321936..54083a310f 100644
--- a/Zend/tests/traits/error_006.phpt
+++ b/Zend/tests/traits/error_006.phpt
@@ -3,7 +3,7 @@ Trying to use an abstract class as trait
--FILE--
<?php
-abstract class abc {
+abstract class abc {
}
class A {
diff --git a/Zend/tests/traits/error_007.phpt b/Zend/tests/traits/error_007.phpt
index c015f6ea76..e6091749c9 100644
--- a/Zend/tests/traits/error_007.phpt
+++ b/Zend/tests/traits/error_007.phpt
@@ -3,7 +3,7 @@ Trying to instantiate a trait
--FILE--
<?php
-trait abc {
+trait abc {
}
new abc;
diff --git a/Zend/tests/traits/flattening001.phpt b/Zend/tests/traits/flattening001.phpt
index 890147dc4a..eed429111e 100644
--- a/Zend/tests/traits/flattening001.phpt
+++ b/Zend/tests/traits/flattening001.phpt
@@ -36,7 +36,7 @@ $o->setText('bar');
var_dump($o->getText());
?>
---EXPECT--
+--EXPECT--
string(4) "test"
string(3) "foo"
string(3) "bar" \ No newline at end of file
diff --git a/Zend/tests/traits/flattening002.phpt b/Zend/tests/traits/flattening002.phpt
index 65f8e2fee5..abae314d1f 100644
--- a/Zend/tests/traits/flattening002.phpt
+++ b/Zend/tests/traits/flattening002.phpt
@@ -1,5 +1,5 @@
--TEST--
-parent:: works like in a method defined without traits.
+parent:: works like in a method defined without traits.
--FILE--
<?php
error_reporting(E_ALL);
@@ -9,7 +9,7 @@ class Base {
echo 'Hello ';
}
}
-
+
trait SayWorld {
public function sayHello() {
parent::sayHello();
@@ -24,5 +24,5 @@ class MyHelloWorld extends Base {
$o = new MyHelloWorld();
$o->sayHello();
?>
---EXPECT--
+--EXPECT--
Hello World! \ No newline at end of file
diff --git a/Zend/tests/traits/flattening003.phpt b/Zend/tests/traits/flattening003.phpt
index 3c5d461be1..276d117bb8 100644
--- a/Zend/tests/traits/flattening003.phpt
+++ b/Zend/tests/traits/flattening003.phpt
@@ -28,5 +28,5 @@ $o = new MyHelloWorld();
$o->sayHello();
$o->sayWorld();
?>
---EXPECT--
+--EXPECT--
Hello World! \ No newline at end of file
diff --git a/Zend/tests/traits/inheritance001.phpt b/Zend/tests/traits/inheritance001.phpt
index 951344ffbb..90cad90c46 100644
--- a/Zend/tests/traits/inheritance001.phpt
+++ b/Zend/tests/traits/inheritance001.phpt
@@ -20,5 +20,5 @@ class TheWorldIsNotEnough {
$o = new TheWorldIsNotEnough();
$o->sayHello(); // echos Hello Universe!
?>
---EXPECT--
+--EXPECT--
Hello Universe! \ No newline at end of file
diff --git a/Zend/tests/traits/inheritance002.phpt b/Zend/tests/traits/inheritance002.phpt
index d258e43981..0bcaca9f07 100644
--- a/Zend/tests/traits/inheritance002.phpt
+++ b/Zend/tests/traits/inheritance002.phpt
@@ -9,7 +9,7 @@ class Base {
echo 'Hello ';
}
}
-
+
trait SayWorld {
public function sayHello() {
echo 'World!';
@@ -23,5 +23,5 @@ class MyHelloWorld extends Base {
$o = new MyHelloWorld();
$o->sayHello();
?>
---EXPECT--
+--EXPECT--
World! \ No newline at end of file
diff --git a/Zend/tests/traits/inheritance003.phpt b/Zend/tests/traits/inheritance003.phpt
index 22ff6e243c..1e630eef61 100644
--- a/Zend/tests/traits/inheritance003.phpt
+++ b/Zend/tests/traits/inheritance003.phpt
@@ -32,7 +32,7 @@ $o = new MyHelloWorld();
$o->sayHello(array());
?>
---EXPECTF--
+--EXPECTF--
World!
Fatal error: Declaration of SayWorld::sayHello(Base $d) must be compatible with Base::sayHello(array $a) in %s on line %d
diff --git a/Zend/tests/traits/language001.phpt b/Zend/tests/traits/language001.phpt
index cd8176ca3b..fd9ec2ddc2 100644
--- a/Zend/tests/traits/language001.phpt
+++ b/Zend/tests/traits/language001.phpt
@@ -17,5 +17,5 @@ class TraitsTest {
$test = new TraitsTest();
$test->hello();
?>
---EXPECT--
+--EXPECT--
Hello
diff --git a/Zend/tests/traits/language002.phpt b/Zend/tests/traits/language002.phpt
index bd11858ee0..ac29e2a124 100644
--- a/Zend/tests/traits/language002.phpt
+++ b/Zend/tests/traits/language002.phpt
@@ -15,18 +15,18 @@ trait World {
echo 'World';
}
}
-
+
class MyHelloWorld {
use Hello, World;
public function sayExclamationMark() {
echo '!';
}
}
-
+
$o = new MyHelloWorld();
$o->sayHello();
$o->sayWorld();
$o->sayExclamationMark();
?>
---EXPECT--
+--EXPECT--
Hello World! \ No newline at end of file
diff --git a/Zend/tests/traits/language003.phpt b/Zend/tests/traits/language003.phpt
index d3b7a64420..2b97a0a150 100644
--- a/Zend/tests/traits/language003.phpt
+++ b/Zend/tests/traits/language003.phpt
@@ -15,15 +15,15 @@ trait World {
echo 'World';
}
}
-
+
class MyHelloWorld {
use Hello, World {
Hello::saySomething insteadof World;
}
}
-
+
$o = new MyHelloWorld();
$o->saySomething();
?>
---EXPECT--
+--EXPECT--
Hello \ No newline at end of file
diff --git a/Zend/tests/traits/language004.phpt b/Zend/tests/traits/language004.phpt
index 31e9da99db..a582c3cd9d 100644
--- a/Zend/tests/traits/language004.phpt
+++ b/Zend/tests/traits/language004.phpt
@@ -15,17 +15,17 @@ trait World {
echo ' World';
}
}
-
+
class MyHelloWorld {
use Hello, World {
Hello::saySomething insteadof World;
World::saySomething as sayWorld;
}
}
-
+
$o = new MyHelloWorld();
$o->saySomething();
$o->sayWorld();
?>
---EXPECT--
+--EXPECT--
Hello World \ No newline at end of file
diff --git a/Zend/tests/traits/language005.phpt b/Zend/tests/traits/language005.phpt
index 13319949f4..84b14c3420 100644
--- a/Zend/tests/traits/language005.phpt
+++ b/Zend/tests/traits/language005.phpt
@@ -24,7 +24,7 @@ trait B {
class Talker {
use A, B {
- B::smallTalk insteadof A;
+ B::smallTalk insteadof A;
A::bigTalk insteadof B;
B::bigTalk as talk;
}
@@ -36,5 +36,5 @@ $t->bigTalk();
$t->talk();
?>
---EXPECT--
+--EXPECT--
bAB \ No newline at end of file
diff --git a/Zend/tests/traits/language006.phpt b/Zend/tests/traits/language006.phpt
index b51a8329ac..e2f77580a3 100644
--- a/Zend/tests/traits/language006.phpt
+++ b/Zend/tests/traits/language006.phpt
@@ -27,5 +27,5 @@ $o->setWorld(' World!');
$o->sayHelloWorld();
?>
---EXPECT--
+--EXPECT--
Hello World! \ No newline at end of file
diff --git a/Zend/tests/traits/language007.phpt b/Zend/tests/traits/language007.phpt
index 082022cc79..5ab676853f 100644
--- a/Zend/tests/traits/language007.phpt
+++ b/Zend/tests/traits/language007.phpt
@@ -26,5 +26,5 @@ $o->sayHello();
$o->sayWorld();
?>
---EXPECT--
+--EXPECT--
Hello World! \ No newline at end of file
diff --git a/Zend/tests/traits/language008a.phpt b/Zend/tests/traits/language008a.phpt
index 0d7a694d57..65a792faac 100644
--- a/Zend/tests/traits/language008a.phpt
+++ b/Zend/tests/traits/language008a.phpt
@@ -19,7 +19,7 @@ $o = new MyClass;
$o->sayHello();
?>
---EXPECTF--
+--EXPECTF--
Fatal error: Uncaught Error: Call to protected method MyClass::sayHello() from context '' in %s:%d
Stack trace:
#0 {main}
diff --git a/Zend/tests/traits/language008b.phpt b/Zend/tests/traits/language008b.phpt
index 8f745126e3..c1a0d2629f 100644
--- a/Zend/tests/traits/language008b.phpt
+++ b/Zend/tests/traits/language008b.phpt
@@ -25,7 +25,7 @@ $o->sayHelloWorld();
?>
---EXPECTF--
+--EXPECTF--
Hello World!Hello World!
Fatal error: Uncaught Error: Call to private method MyClass::sayHelloWorld() from context '' in %s:%d
Stack trace:
diff --git a/Zend/tests/traits/language009.phpt b/Zend/tests/traits/language009.phpt
index 477d267e29..998fde8e61 100644
--- a/Zend/tests/traits/language009.phpt
+++ b/Zend/tests/traits/language009.phpt
@@ -24,7 +24,7 @@ trait C {
class MyClass {
use C, A, B {
- B::foo insteadof A, C;
+ B::foo insteadof A, C;
}
}
@@ -32,5 +32,5 @@ $t = new MyClass;
$t->foo();
?>
---EXPECT--
+--EXPECT--
b \ No newline at end of file
diff --git a/Zend/tests/traits/language010.phpt b/Zend/tests/traits/language010.phpt
index e550abb7bc..ac3ab2e29e 100644
--- a/Zend/tests/traits/language010.phpt
+++ b/Zend/tests/traits/language010.phpt
@@ -26,5 +26,5 @@ $o->hello();
$o->world();
?>
---EXPECTF--
+--EXPECTF--
Fatal error: Trait method world has not been applied, because there are collisions with other trait methods on MyClass in %s on line %d \ No newline at end of file
diff --git a/Zend/tests/traits/language011.phpt b/Zend/tests/traits/language011.phpt
index 585699da55..44de874705 100644
--- a/Zend/tests/traits/language011.phpt
+++ b/Zend/tests/traits/language011.phpt
@@ -26,5 +26,5 @@ $o->sayHello();
$o->sayWorld();
?>
---EXPECTF--
+--EXPECTF--
Fatal error: Trait method sayHello has not been applied, because there are collisions with other trait methods on MyClass in %s on line %d
diff --git a/Zend/tests/traits/language012.phpt b/Zend/tests/traits/language012.phpt
index af854a79e2..3fe7fb8e62 100644
--- a/Zend/tests/traits/language012.phpt
+++ b/Zend/tests/traits/language012.phpt
@@ -22,6 +22,6 @@ $o->inc();
$o->inc();
?>
---EXPECT--
+--EXPECT--
1
2
diff --git a/Zend/tests/traits/language013.phpt b/Zend/tests/traits/language013.phpt
index 91eba5705b..d3de644756 100644
--- a/Zend/tests/traits/language013.phpt
+++ b/Zend/tests/traits/language013.phpt
@@ -30,7 +30,7 @@ $p->inc();
$p->inc();
?>
---EXPECT--
+--EXPECT--
1
2
1
diff --git a/Zend/tests/traits/language014.phpt b/Zend/tests/traits/language014.phpt
index 102b9aed41..20dcdea7c8 100644
--- a/Zend/tests/traits/language014.phpt
+++ b/Zend/tests/traits/language014.phpt
@@ -26,5 +26,5 @@ $o->hello();
$o->world();
?>
---EXPECTF--
+--EXPECTF--
Fatal error: Trait method hello has not been applied, because there are collisions with other trait methods on MyClass in %s on line %d
diff --git a/Zend/tests/traits/methods_001.phpt b/Zend/tests/traits/methods_001.phpt
index e1ee8152a6..758234f2d5 100644
--- a/Zend/tests/traits/methods_001.phpt
+++ b/Zend/tests/traits/methods_001.phpt
@@ -3,19 +3,19 @@ Testing magic method on trait
--FILE--
<?php
-trait foo {
+trait foo {
public function __toString() {
return '123';
}
-
+
public function __get($x) {
var_dump($x);
}
-
+
public function __set($attr, $val) {
var_dump($attr .'==='. $val);
}
-
+
public function __clone() {
var_dump(__FUNCTION__);
}
diff --git a/Zend/tests/traits/methods_002.phpt b/Zend/tests/traits/methods_002.phpt
index 4ed64c1a55..2a4215fb2c 100644
--- a/Zend/tests/traits/methods_002.phpt
+++ b/Zend/tests/traits/methods_002.phpt
@@ -3,7 +3,7 @@ Testing collision with magic methods
--FILE--
<?php
-trait foo {
+trait foo {
public function __clone() {
var_dump(__FUNCTION__);
}
diff --git a/Zend/tests/traits/methods_003.phpt b/Zend/tests/traits/methods_003.phpt
index 1c1218ae3a..d050b1135f 100644
--- a/Zend/tests/traits/methods_003.phpt
+++ b/Zend/tests/traits/methods_003.phpt
@@ -3,7 +3,7 @@ Testing __construct and __destruct with Trait
--FILE--
<?php
-trait foo {
+trait foo {
public function __construct() {
var_dump(__FUNCTION__);
}
diff --git a/Zend/tests/traits/property001.phpt b/Zend/tests/traits/property001.phpt
index 90dd8ca92d..291037da07 100644
--- a/Zend/tests/traits/property001.phpt
+++ b/Zend/tests/traits/property001.phpt
@@ -29,7 +29,7 @@ class TraitsTest2 {
var_dump(property_exists('TraitsTest', 'foo'));
var_dump(property_exists('TraitsTest2', 'foo'));
?>
---EXPECT--
+--EXPECT--
PRE-CLASS-GUARD-TraitsTest
PRE-CLASS-GUARD-TraitsTest2
bool(true)
diff --git a/Zend/tests/traits/property002.phpt b/Zend/tests/traits/property002.phpt
index c96f314c93..ecd04fb332 100644
--- a/Zend/tests/traits/property002.phpt
+++ b/Zend/tests/traits/property002.phpt
@@ -25,7 +25,7 @@ var_dump(property_exists('TraitsTest', 'world'));
$t = new TraitsTest;
$t->test();
?>
---EXPECT--
+--EXPECT--
bool(true)
bool(true)
hello World!
diff --git a/Zend/tests/traits/property003.phpt b/Zend/tests/traits/property003.phpt
index 09686277db..5a2863cfe1 100644
--- a/Zend/tests/traits/property003.phpt
+++ b/Zend/tests/traits/property003.phpt
@@ -23,7 +23,7 @@ echo "POST-CLASS-GUARD\n";
$t = new TraitsTest;
$t->hello = "foo";
?>
---EXPECTF--
+--EXPECTF--
PRE-CLASS-GUARD
Fatal error: THello1 and THello2 define the same property ($hello) in the composition of TraitsTest. However, the definition differs and is considered incompatible. Class was composed in %s on line %d
diff --git a/Zend/tests/traits/property004.phpt b/Zend/tests/traits/property004.phpt
index a2a8d41301..53dca02e02 100644
--- a/Zend/tests/traits/property004.phpt
+++ b/Zend/tests/traits/property004.phpt
@@ -23,7 +23,7 @@ class TraitsTest {
$t = new TraitsTest;
?>
---EXPECTF--
+--EXPECTF--
PRE-CLASS-GUARD
Fatal error: THello1 and THello2 define the same property ($hello) in the composition of TraitsTest. However, the definition differs and is considered incompatible. Class was composed in %s on line %d
diff --git a/Zend/tests/traits/property005.phpt b/Zend/tests/traits/property005.phpt
index 2fce84e878..5bdbfcdaba 100644
--- a/Zend/tests/traits/property005.phpt
+++ b/Zend/tests/traits/property005.phpt
@@ -4,7 +4,7 @@ The same rules are applied for properties that are defined in the class hierarch
<?php
class Base {
- private $hello;
+ private $hello;
}
trait THello1 {
@@ -30,7 +30,7 @@ echo "POST-CLASS-GUARD2\n";
$t = new TraitsTest;
$t->hello = "foo";
?>
---EXPECTF--
+--EXPECTF--
PRE-CLASS-GUARD
POST-CLASS-GUARD
diff --git a/Zend/tests/traits/property006.phpt b/Zend/tests/traits/property006.phpt
index fc21e558b9..bbb364e8fc 100644
--- a/Zend/tests/traits/property006.phpt
+++ b/Zend/tests/traits/property006.phpt
@@ -4,7 +4,7 @@ Introducing new private variables of the same name in a subclass is ok, and does
<?php
class Base {
- private $hello;
+ private $hello;
}
trait THello1 {
@@ -28,7 +28,7 @@ class Notice extends Base {
}
echo "POST-CLASS-GUARD2\n";
?>
---EXPECT--
+--EXPECT--
PRE-CLASS-GUARD
POST-CLASS-GUARD
POST-CLASS-GUARD2
diff --git a/Zend/tests/traits/property007.phpt b/Zend/tests/traits/property007.phpt
index d2f3f0ff59..ae52ef08e3 100644
--- a/Zend/tests/traits/property007.phpt
+++ b/Zend/tests/traits/property007.phpt
@@ -4,7 +4,7 @@ Introducing new private variables of the same name in a subclass is ok, and does
<?php
class Base {
- protected $hello;
+ protected $hello;
}
trait THello1 {
@@ -27,7 +27,7 @@ class Notice extends Base {
}
echo "POST-CLASS-GUARD2\n";
?>
---EXPECT--
+--EXPECT--
PRE-CLASS-GUARD
POST-CLASS-GUARD
POST-CLASS-GUARD2
diff --git a/Zend/tests/traits/property008.phpt b/Zend/tests/traits/property008.phpt
index 694ca85b5d..ff265be2a0 100644
--- a/Zend/tests/traits/property008.phpt
+++ b/Zend/tests/traits/property008.phpt
@@ -40,7 +40,7 @@ $b = new SubclassB;
var_dump($b);
?>
---EXPECT--
+--EXPECT--
object(SubclassClassicInheritance)#1 (2) {
["hello":"SubclassClassicInheritance":private]=>
int(0)
diff --git a/Zend/tests/traits/trait_constant_001.phpt b/Zend/tests/traits/trait_constant_001.phpt
index 590949c2f6..7a5268633e 100644
--- a/Zend/tests/traits/trait_constant_001.phpt
+++ b/Zend/tests/traits/trait_constant_001.phpt
@@ -14,7 +14,7 @@ class Direct {
}
class IndirectInheritance extends Direct {
-
+
}
trait TestTraitIndirect {
diff --git a/Zend/tests/traits/trait_constant_002.phpt b/Zend/tests/traits/trait_constant_002.phpt
index bbafbf210e..ece3f61f9d 100644
--- a/Zend/tests/traits/trait_constant_002.phpt
+++ b/Zend/tests/traits/trait_constant_002.phpt
@@ -8,11 +8,11 @@ __TRAIT__: Use outside of traits.
return __TRAIT__;
}
}
-
+
function someFun() {
return __TRAIT__;
}
-
+
$t = __TRAIT__;
var_dump($t);