summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/basic/php_egg_logo_guid.phpt13
-rw-r--r--tests/basic/php_logo_guid.phpt10
-rw-r--r--tests/basic/php_real_logo_guid.phpt12
-rw-r--r--tests/basic/req60524-win.phpt13
-rw-r--r--tests/basic/req60524.phpt14
-rw-r--r--tests/basic/zend_logo_guid.phpt13
-rw-r--r--tests/classes/implicit_instantiation_001.phpt16
-rw-r--r--tests/func/011.phpt10
-rw-r--r--tests/func/bug64523.phpt10
-rw-r--r--tests/lang/bug24403.phpt3
-rw-r--r--tests/lang/foreachLoop.007.phpt11
-rw-r--r--tests/lang/foreachLoop.008.phpt10
-rw-r--r--tests/output/ob_017.phpt2
-rw-r--r--tests/output/ob_start_basic_004.phpt2
14 files changed, 67 insertions, 72 deletions
diff --git a/tests/basic/php_egg_logo_guid.phpt b/tests/basic/php_egg_logo_guid.phpt
deleted file mode 100644
index b3c5d7bdfd..0000000000
--- a/tests/basic/php_egg_logo_guid.phpt
+++ /dev/null
@@ -1,13 +0,0 @@
---TEST--
-Testing php_egg_logo_guid() function
---FILE--
-<?php
-echo php_egg_logo_guid();
-?>
---EXPECT--
-PHPE9568F36-D428-11d2-A769-00AA001ACF42
-
---CREDITS--
-Jason Easter <easter@phpug-wuerzburg.de>
-PHPUG Würzburg <phpug-wuerzburg.de>
-Testfest 2009 2009-06-20 \ No newline at end of file
diff --git a/tests/basic/php_logo_guid.phpt b/tests/basic/php_logo_guid.phpt
deleted file mode 100644
index b5724a96ab..0000000000
--- a/tests/basic/php_logo_guid.phpt
+++ /dev/null
@@ -1,10 +0,0 @@
---TEST--
-Testing php_logo_guid() function
---FILE--
-<?php
-echo php_logo_guid();
-?>
---EXPECT--
-PHPE9568F34-D428-11d2-A769-00AA001ACF42
---CREDITS--
-Testfest 2009 2009-06-20 \ No newline at end of file
diff --git a/tests/basic/php_real_logo_guid.phpt b/tests/basic/php_real_logo_guid.phpt
deleted file mode 100644
index 2b9003a350..0000000000
--- a/tests/basic/php_real_logo_guid.phpt
+++ /dev/null
@@ -1,12 +0,0 @@
---TEST--
-Testing php_real_logo_guid() function
---FILE--
-<?php
-echo php_real_logo_guid();
-?>
---EXPECT--
-PHPE9568F34-D428-11d2-A769-00AA001ACF42
---CREDITS--
-Jason Easter <easter@phpug-wuerzburg.de>
-PHPUG Würzburg <phpug-wuerzburg.de>
-Testfest 2009 2009-06-20 \ No newline at end of file
diff --git a/tests/basic/req60524-win.phpt b/tests/basic/req60524-win.phpt
new file mode 100644
index 0000000000..b2e7cfdab4
--- /dev/null
+++ b/tests/basic/req60524-win.phpt
@@ -0,0 +1,13 @@
+--TEST--
+Req #60524 (Specify temporary directory)
+--INI--
+sys_temp_dir=C:\Windows
+--SKIPIF--
+<?php
+if( substr(PHP_OS, 0, 3) != "WIN" )
+ die('skip Run only on Windows');
+?>
+--FILE--
+<?php echo sys_get_temp_dir(); ?>
+--EXPECT--
+C:\\Windows
diff --git a/tests/basic/req60524.phpt b/tests/basic/req60524.phpt
new file mode 100644
index 0000000000..7cc3edfabf
--- /dev/null
+++ b/tests/basic/req60524.phpt
@@ -0,0 +1,14 @@
+--TEST--
+Req #60524 (Specify temporary directory)
+--INI--
+sys_temp_dir=/path/to/temp/dir
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die('skip non-windows only test');
+}
+?>
+--FILE--
+<?php echo sys_get_temp_dir(); ?>
+--EXPECT--
+/path/to/temp/dir
diff --git a/tests/basic/zend_logo_guid.phpt b/tests/basic/zend_logo_guid.phpt
deleted file mode 100644
index 23ca0165ae..0000000000
--- a/tests/basic/zend_logo_guid.phpt
+++ /dev/null
@@ -1,13 +0,0 @@
---TEST--
-Testing zend_logo_guid() function
---FILE--
-<?php
-echo zend_logo_guid();
-?>
---EXPECT--
-PHPE9568F35-D428-11d2-A769-00AA001ACF42
-
---CREDITS--
-Jason Easter <easter@phpug-wuerzburg.de>
-PHPUG Würzburg <phpug-wuerzburg.de>
-Testfest 2009 2009-06-20 \ No newline at end of file
diff --git a/tests/classes/implicit_instantiation_001.phpt b/tests/classes/implicit_instantiation_001.phpt
index 8d2f32da21..51427df1e8 100644
--- a/tests/classes/implicit_instantiation_001.phpt
+++ b/tests/classes/implicit_instantiation_001.phpt
@@ -20,7 +20,7 @@ foreach($c as $name => $value) {
echo "\n --> Attempting implicit conversion to object using increment...\n";
$c->$name->prop++;
$c->$name = $value; // reset value in case implicit conversion was successful
-
+
echo "\n --> Attempting implicit conversion to object using assignment...\n";
$c->$name->prop = "Implicit instantiation!";
$c->$name = $value; // reset value in case implicit conversion was successful
@@ -41,6 +41,8 @@ var_dump($c);
Warning: Creating default object from empty value in %s on line 18
+Notice: Undefined property: stdClass::$prop in %s on line 18
+
--> Attempting implicit conversion to object using assignment...
Warning: Creating default object from empty value in %s on line 22
@@ -49,12 +51,16 @@ Warning: Creating default object from empty value in %s on line 22
Warning: Creating default object from empty value in %s on line 26
+Notice: Undefined property: stdClass::$prop in %s on line 26
+
---( $c->emptyString )---
--> Attempting implicit conversion to object using increment...
Warning: Creating default object from empty value in %s on line 18
+Notice: Undefined property: stdClass::$prop in %s on line 18
+
--> Attempting implicit conversion to object using assignment...
Warning: Creating default object from empty value in %s on line 22
@@ -63,12 +69,16 @@ Warning: Creating default object from empty value in %s on line 22
Warning: Creating default object from empty value in %s on line 26
+Notice: Undefined property: stdClass::$prop in %s on line 26
+
---( $c->null )---
--> Attempting implicit conversion to object using increment...
Warning: Creating default object from empty value in %s on line 18
+Notice: Undefined property: stdClass::$prop in %s on line 18
+
--> Attempting implicit conversion to object using assignment...
Warning: Creating default object from empty value in %s on line 22
@@ -77,6 +87,8 @@ Warning: Creating default object from empty value in %s on line 22
Warning: Creating default object from empty value in %s on line 26
+Notice: Undefined property: stdClass::$prop in %s on line 26
+
---( $c->boolTrue )---
--> Attempting implicit conversion to object using increment...
@@ -143,4 +155,4 @@ Warning: Attempt to assign property of non-object in %s on line 26
%unicode|string%(5) "hello"
[%u|b%"intZero"]=>
int(0)
-} \ No newline at end of file
+}
diff --git a/tests/func/011.phpt b/tests/func/011.phpt
new file mode 100644
index 0000000000..ec93214a78
--- /dev/null
+++ b/tests/func/011.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Test bitwise AND, OR, XOR, NOT and logical NOT in INI via error_reporting
+--INI--
+error_reporting = E_ALL & E_NOTICE | E_STRICT ^ E_DEPRECATED & ~E_WARNING | !E_ERROR
+--FILE--
+<?php
+echo ini_get('error_reporting');
+?>
+--EXPECT--
+10248
diff --git a/tests/func/bug64523.phpt b/tests/func/bug64523.phpt
new file mode 100644
index 0000000000..e0092ada64
--- /dev/null
+++ b/tests/func/bug64523.phpt
@@ -0,0 +1,10 @@
+--TEST--
+Bug #64523: XOR not parsed in INI
+--INI--
+error_reporting = E_ALL ^ E_NOTICE ^ E_STRICT ^ E_DEPRECATED
+--FILE--
+<?php
+echo ini_get('error_reporting');
+?>
+--EXPECTF--
+22519
diff --git a/tests/lang/bug24403.phpt b/tests/lang/bug24403.phpt
index fe99257d3d..8f4934e7b9 100644
--- a/tests/lang/bug24403.phpt
+++ b/tests/lang/bug24403.phpt
@@ -17,4 +17,5 @@ class a
}
new a();
?>
---EXPECT--
+--EXPECTF--
+Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in %s on line %d
diff --git a/tests/lang/foreachLoop.007.phpt b/tests/lang/foreachLoop.007.phpt
deleted file mode 100644
index f47fdc735f..0000000000
--- a/tests/lang/foreachLoop.007.phpt
+++ /dev/null
@@ -1,11 +0,0 @@
---TEST--
-Foreach loop tests - error case: reference to constant array.
---FILE--
-<?php
-echo "\nReference to constant array\n";
-foreach (array(1,2) as &$v) {
- var_dump($v);
-}
-?>
---EXPECTF--
-Parse error: %s on line 3
diff --git a/tests/lang/foreachLoop.008.phpt b/tests/lang/foreachLoop.008.phpt
deleted file mode 100644
index 787f43b883..0000000000
--- a/tests/lang/foreachLoop.008.phpt
+++ /dev/null
@@ -1,10 +0,0 @@
---TEST--
-Foreach loop tests - error case: reference to constant array, with key.
---FILE--
-<?php
-foreach (array(1,2) as $k=>&$v) {
- var_dump($v);
-}
-?>
---EXPECTF--
-Fatal error: Cannot create references to elements of a temporary array expression in %s on line 2
diff --git a/tests/output/ob_017.phpt b/tests/output/ob_017.phpt
index 517fafe991..1dc5fc59be 100644
--- a/tests/output/ob_017.phpt
+++ b/tests/output/ob_017.phpt
@@ -1,5 +1,7 @@
--TEST--
output buffering - stati
+--INI--
+opcache.optimization_level=0
--FILE--
<?php
$stati = array();
diff --git a/tests/output/ob_start_basic_004.phpt b/tests/output/ob_start_basic_004.phpt
index 16f09e8a9a..710df7a8a0 100644
--- a/tests/output/ob_start_basic_004.phpt
+++ b/tests/output/ob_start_basic_004.phpt
@@ -1,5 +1,7 @@
--TEST--
ob_start() chunk_size: confirm buffer is flushed after any output call that causes its length to equal or exceed chunk_size.
+--INI--
+opcache.optimization_level=0
--FILE--
<?php
/*