]> granicus.if.org Git - php/commitdiff
add tests for E_STRICT that will become E_FATAL in PHP 6
authorAntony Dovgal <tony2001@php.net>
Wed, 31 May 2006 14:54:52 +0000 (14:54 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 31 May 2006 14:54:52 +0000 (14:54 +0000)
Zend/tests/objects_002.phpt [new file with mode: 0644]
Zend/tests/objects_003.phpt [new file with mode: 0644]
Zend/tests/objects_004.phpt [new file with mode: 0644]
Zend/tests/objects_005.phpt [new file with mode: 0644]
Zend/tests/objects_006.phpt [new file with mode: 0644]
Zend/tests/objects_007.phpt [new file with mode: 0644]
Zend/tests/objects_008.phpt [new file with mode: 0644]
Zend/tests/objects_009.phpt [new file with mode: 0644]

diff --git a/Zend/tests/objects_002.phpt b/Zend/tests/objects_002.phpt
new file mode 100644 (file)
index 0000000..87ba0fd
--- /dev/null
@@ -0,0 +1,24 @@
+--TEST--
+method overloading with different method signature
+--INI--
+error_reporting=8191
+--FILE--
+<?php
+
+class test {
+       function foo() {}
+}
+
+class test2 extends test {
+       function foo() {} 
+}
+
+class test3 extends test {
+       function foo($arg) {} 
+}
+
+echo "Done\n";
+?>
+--EXPECTF--    
+Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Done
diff --git a/Zend/tests/objects_003.phpt b/Zend/tests/objects_003.phpt
new file mode 100644 (file)
index 0000000..1c25429
--- /dev/null
@@ -0,0 +1,24 @@
+--TEST--
+method overloading with different method signature
+--INI--
+error_reporting=8191
+--FILE--
+<?php
+
+class test {
+       function foo($arg) {}
+}
+
+class test2 extends test {
+       function foo($arg) {} 
+}
+
+class test3 extends test {
+       function foo($arg, $arg2) {} 
+}
+
+echo "Done\n";
+?>
+--EXPECTF--    
+Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Done
diff --git a/Zend/tests/objects_004.phpt b/Zend/tests/objects_004.phpt
new file mode 100644 (file)
index 0000000..35ab477
--- /dev/null
@@ -0,0 +1,24 @@
+--TEST--
+method overloading with different method signature
+--INI--
+error_reporting=8191
+--FILE--
+<?php
+
+class test {
+       function foo($arg) {}
+}
+
+class test2 extends test {
+       function foo($arg) {} 
+}
+
+class test3 extends test {
+       function foo(&$arg) {} 
+}
+
+echo "Done\n";
+?>
+--EXPECTF--    
+Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Done
diff --git a/Zend/tests/objects_005.phpt b/Zend/tests/objects_005.phpt
new file mode 100644 (file)
index 0000000..d583c9b
--- /dev/null
@@ -0,0 +1,24 @@
+--TEST--
+method overloading with different method signature
+--INI--
+error_reporting=8191
+--FILE--
+<?php
+
+class test {
+       function &foo() {}
+}
+
+class test2 extends test {
+       function &foo() {} 
+}
+
+class test3 extends test {
+       function foo() {} 
+}
+
+echo "Done\n";
+?>
+--EXPECTF--    
+Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Done
diff --git a/Zend/tests/objects_006.phpt b/Zend/tests/objects_006.phpt
new file mode 100644 (file)
index 0000000..fb2e28b
--- /dev/null
@@ -0,0 +1,24 @@
+--TEST--
+method overloading with different method signature
+--INI--
+error_reporting=8191
+--FILE--
+<?php
+
+class test {
+       function foo($arg, $arg2 = NULL) {}
+}
+
+class test2 extends test {
+       function foo($arg, $arg2 = NULL) {} 
+}
+
+class test3 extends test {
+       function foo($arg, $arg2) {} 
+}
+
+echo "Done\n";
+?>
+--EXPECTF--    
+Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Done
diff --git a/Zend/tests/objects_007.phpt b/Zend/tests/objects_007.phpt
new file mode 100644 (file)
index 0000000..2fce04a
--- /dev/null
@@ -0,0 +1,24 @@
+--TEST--
+method overloading with different method signature
+--INI--
+error_reporting=8191
+--FILE--
+<?php
+
+class test {
+       function foo($arg, &$arg2 = NULL) {}
+}
+
+class test2 extends test {
+       function foo($arg, &$arg2 = NULL) {} 
+}
+
+class test3 extends test {
+       function foo($arg, &$arg2) {} 
+}
+
+echo "Done\n";
+?>
+--EXPECTF--    
+Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Done
diff --git a/Zend/tests/objects_008.phpt b/Zend/tests/objects_008.phpt
new file mode 100644 (file)
index 0000000..b61d167
--- /dev/null
@@ -0,0 +1,24 @@
+--TEST--
+method overloading with different method signature
+--INI--
+error_reporting=8191
+--FILE--
+<?php
+
+class test {
+       function foo(Test $arg) {}
+}
+
+class test2 extends test {
+       function foo(Test $arg) {} 
+}
+
+class test3 extends test {
+       function foo(Test3 $arg) {} 
+}
+
+echo "Done\n";
+?>
+--EXPECTF--    
+Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Done
diff --git a/Zend/tests/objects_009.phpt b/Zend/tests/objects_009.phpt
new file mode 100644 (file)
index 0000000..5fad004
--- /dev/null
@@ -0,0 +1,24 @@
+--TEST--
+method overloading with different method signature
+--INI--
+error_reporting=8191
+--FILE--
+<?php
+
+class test {
+       function foo(Test $arg) {}
+}
+
+class test2 extends test {
+       function foo(Test $arg) {} 
+}
+
+class test3 extends test {
+       function foo($arg) {} 
+}
+
+echo "Done\n";
+?>
+--EXPECTF--    
+Strict Standards: Declaration of test3::foo() should be compatible with that of test::foo() in %s on line %d
+Done