summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/output/bug46897.phpt4
-rw-r--r--tests/output/ob_011.phpt2
-rw-r--r--tests/output/ob_013.phpt72
-rw-r--r--tests/output/ob_017.phpt12
-rw-r--r--tests/output/ob_clean_basic_001.phpt4
-rw-r--r--tests/output/ob_end_clean_basic_001.phpt4
-rw-r--r--tests/output/ob_end_flush_basic_001.phpt6
-rw-r--r--tests/output/ob_flush_basic_001.phpt4
-rw-r--r--tests/output/ob_get_clean_basic_001.phpt1
-rw-r--r--tests/output/ob_get_level_basic_001.phpt4
-rw-r--r--tests/output/ob_get_status.phpt23
-rw-r--r--tests/output/ob_start_basic_004.phpt18
-rw-r--r--tests/output/ob_start_basic_006.phpt43
-rw-r--r--tests/output/ob_start_basic_unerasable_002.phpt6
-rw-r--r--tests/output/ob_start_basic_unerasable_003.phpt9
-rw-r--r--tests/output/ob_start_basic_unerasable_004.phpt9
-rw-r--r--tests/output/ob_start_basic_unerasable_005.phpt4
-rw-r--r--tests/output/ob_start_error_001.phpt13
-rw-r--r--tests/output/ob_start_error_002.phpt7
-rw-r--r--tests/output/ob_start_error_003.phpt4
-rw-r--r--tests/output/ob_start_error_004.phpt4
21 files changed, 119 insertions, 134 deletions
diff --git a/tests/output/bug46897.phpt b/tests/output/bug46897.phpt
index 8fe80bc..6cfb102 100644
--- a/tests/output/bug46897.phpt
+++ b/tests/output/bug46897.phpt
@@ -18,10 +18,10 @@ echo 'Done';
?>
--EXPECTF--
[callback:1]Attempt to flush unerasable buffer - should fail...
-Notice: ob_flush(): failed to flush buffer of callback (0) in %s on line %d
+Notice: ob_flush(): failed to flush buffer callback. in %s on line %d
bool(false)
string(%d) "Attempt to flush unerasable buffer - should fail...
-Notice: ob_flush(): failed to flush buffer of callback (0) in %s on line %d
+Notice: ob_flush(): failed to flush buffer callback. in %s on line %d
bool(false)
"
Done
diff --git a/tests/output/ob_011.phpt b/tests/output/ob_011.phpt
index 35b0388..a90fd56 100644
--- a/tests/output/ob_011.phpt
+++ b/tests/output/ob_011.phpt
@@ -1,5 +1,7 @@
--TEST--
output buffering - fatalism
+--XFAIL--
+This test will fail until the fix in revision r214155 is backported from php 6
--FILE--
<?php
function obh($s)
diff --git a/tests/output/ob_013.phpt b/tests/output/ob_013.phpt
index e96de46..ce5b5e5 100644
--- a/tests/output/ob_013.phpt
+++ b/tests/output/ob_013.phpt
@@ -37,69 +37,67 @@ Array
)
Array
(
- [name] => d
+ [level] => 5
[type] => 1
- [flags] => 4209
- [level] => 4
- [chunk_size] => %d
- [buffer_size] => 16384
- [buffer_used] => 96
+ [status] => 1
+ [name] => d
+ [del] => 1
)
Array
(
[0] => Array
(
+ [chunk_size] => 0
+ [size] => 40960
+ [block_size] => 10240
+ [type] => 1
+ [status] => 0
[name] => default output handler
- [type] => 0
- [flags] => 112
- [level] => 0
- [chunk_size] => %d
- [buffer_size] => 16384
- [buffer_used] => 0
+ [del] => 1
)
[1] => Array
(
- [name] => a
+ [chunk_size] => 0
+ [size] => 40960
+ [block_size] => 10240
[type] => 1
- [flags] => 113
- [level] => 1
- [chunk_size] => %d
- [buffer_size] => 16384
- [buffer_used] => 0
+ [status] => 0
+ [name] => a
+ [del] => 1
)
[2] => Array
(
- [name] => b
+ [chunk_size] => 0
+ [size] => 40960
+ [block_size] => 10240
[type] => 1
- [flags] => 113
- [level] => 2
- [chunk_size] => %d
- [buffer_size] => 16384
- [buffer_used] => 0
+ [status] => 0
+ [name] => b
+ [del] => 1
)
[3] => Array
(
- [name] => c
+ [chunk_size] => 0
+ [size] => 40960
+ [block_size] => 10240
[type] => 1
- [flags] => 113
- [level] => 3
- [chunk_size] => %d
- [buffer_size] => 16384
- [buffer_used] => 4
+ [status] => 0
+ [name] => c
+ [del] => 1
)
[4] => Array
(
- [name] => d
+ [chunk_size] => 0
+ [size] => 40960
+ [block_size] => 10240
[type] => 1
- [flags] => 4209
- [level] => 4
- [chunk_size] => %d
- [buffer_size] => 16384
- [buffer_used] => %d
+ [status] => 1
+ [name] => d
+ [del] => 1
)
-)
+) \ No newline at end of file
diff --git a/tests/output/ob_017.phpt b/tests/output/ob_017.phpt
index 070df60..fc50e2f 100644
--- a/tests/output/ob_017.phpt
+++ b/tests/output/ob_017.phpt
@@ -24,11 +24,11 @@ yes!
yes!
Array
(
- [0] => 1: yes
- [1] => 4: !
+ [0] => 3: yes
+ [1] => 2: !
- [2] => 2:
- [3] => 0: yes!
+ [2] => 2: no
+ [3] => 2: yes!
- [4] => 10:
-)
+ [4] => 4: no
+) \ No newline at end of file
diff --git a/tests/output/ob_clean_basic_001.phpt b/tests/output/ob_clean_basic_001.phpt
index afaa7e2..c93bea3 100644
--- a/tests/output/ob_clean_basic_001.phpt
+++ b/tests/output/ob_clean_basic_001.phpt
@@ -29,8 +29,8 @@ echo "Done";
-- Testing ob_clean() function with Zero arguments --
-Notice: ob_clean(): failed to delete buffer. No buffer to delete in %s on line 12
+Notice: ob_clean(): failed to delete buffer. No buffer to delete. in %s on line 12
bool(false)
string(61) "bool(true)
Ensure the buffer is still active after the clean."
-Done
+Done \ No newline at end of file
diff --git a/tests/output/ob_end_clean_basic_001.phpt b/tests/output/ob_end_clean_basic_001.phpt
index 54e840b..0b694e3 100644
--- a/tests/output/ob_end_clean_basic_001.phpt
+++ b/tests/output/ob_end_clean_basic_001.phpt
@@ -21,11 +21,11 @@ var_dump(ob_end_clean());
?>
--EXPECTF--
-Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in %s on line 7
+Notice: ob_end_clean(): failed to delete buffer. No buffer to delete. in %s on line 7
bool(false)
bool(true)
bool(true)
-Notice: ob_end_clean(): failed to delete buffer. No buffer to delete in %s on line 16
+Notice: ob_end_clean(): failed to delete buffer. No buffer to delete. in %s on line 16
bool(false)
diff --git a/tests/output/ob_end_flush_basic_001.phpt b/tests/output/ob_end_flush_basic_001.phpt
index cba7802..7515fac 100644
--- a/tests/output/ob_end_flush_basic_001.phpt
+++ b/tests/output/ob_end_flush_basic_001.phpt
@@ -30,12 +30,12 @@ echo "Done";
-- Testing ob_end_flush() function with Zero arguments --
-Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush in %s on line 12
+Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in %s on line 12
bool(false)
bool(true)
Hello
bool(true)
-Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush in %s on line 21
+Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in %s on line 21
bool(false)
-Done
+Done \ No newline at end of file
diff --git a/tests/output/ob_flush_basic_001.phpt b/tests/output/ob_flush_basic_001.phpt
index 57de5e3..91fb695 100644
--- a/tests/output/ob_flush_basic_001.phpt
+++ b/tests/output/ob_flush_basic_001.phpt
@@ -30,10 +30,10 @@ echo "Done";
-- Testing ob_flush() function with Zero arguments --
-Notice: ob_flush(): failed to flush buffer. No buffer to flush in %s on line 12
+Notice: ob_flush(): failed to flush buffer. No buffer to flush. in %s on line 12
bool(false)
This should get flushed.
bool(true)
Ensure the buffer is still active after the flush.
bool(true)
-Done
+Done \ No newline at end of file
diff --git a/tests/output/ob_get_clean_basic_001.phpt b/tests/output/ob_get_clean_basic_001.phpt
index b57ddab..07673df 100644
--- a/tests/output/ob_get_clean_basic_001.phpt
+++ b/tests/output/ob_get_clean_basic_001.phpt
@@ -14,6 +14,5 @@ echo "Hello World";
var_dump(ob_get_clean());
?>
--EXPECTF--
-Notice: ob_get_clean(): failed to delete buffer. No buffer to delete in %s on line 7
bool(false)
string(11) "Hello World" \ No newline at end of file
diff --git a/tests/output/ob_get_level_basic_001.phpt b/tests/output/ob_get_level_basic_001.phpt
index 65f3291..78217e4 100644
--- a/tests/output/ob_get_level_basic_001.phpt
+++ b/tests/output/ob_get_level_basic_001.phpt
@@ -42,6 +42,6 @@ int(2)
int(1)
int(0)
-Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush in %s on line 26
+Notice: ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in %s on line 26
int(0)
-Done
+Done \ No newline at end of file
diff --git a/tests/output/ob_get_status.phpt b/tests/output/ob_get_status.phpt
index 9580729..a6a3498 100644
--- a/tests/output/ob_get_status.phpt
+++ b/tests/output/ob_get_status.phpt
@@ -15,19 +15,20 @@ var_dump($status);
array(1) {
[0]=>
array(7) {
- ["name"]=>
- string(22) "default output handler"
- ["type"]=>
- int(0)
- ["flags"]=>
- int(112)
- ["level"]=>
- int(0)
["chunk_size"]=>
int(0)
- ["buffer_size"]=>
- int(16384)
- ["buffer_used"]=>
+ ["size"]=>
+ int(40960)
+ ["block_size"]=>
+ int(10240)
+ ["type"]=>
+ int(1)
+ ["status"]=>
int(0)
+ ["name"]=>
+ string(22) "default output handler"
+ ["del"]=>
+ bool(true)
}
}
+
diff --git a/tests/output/ob_start_basic_004.phpt b/tests/output/ob_start_basic_004.phpt
index 16f09e8..39d3aad 100644
--- a/tests/output/ob_start_basic_004.phpt
+++ b/tests/output/ob_start_basic_004.phpt
@@ -1,12 +1,12 @@
--TEST--
-ob_start() chunk_size: confirm buffer is flushed after any output call that causes its length to equal or exceed chunk_size.
+ob_start() chunk_size: confirm buffer is flushed after any output call that causes its length to equal or exceed chunk_size.
--FILE--
<?php
/*
* proto bool ob_start([ string|array user_function [, int chunk_size [, bool erase]]])
* Function is implemented in main/output.c
*/
-// In HEAD, $chunk_size value of 1 should not have any special behaviour (http://marc.info/?l=php-internals&m=123476465621346&w=2).
+
function callback($string) {
global $callback_invocations;
$callback_invocations++;
@@ -40,15 +40,7 @@ f[call:1; len:8]12345678
f[call:1; len:8]12345678
----( chunk_size: 1, output append size: 1 )----
-f[call:1; len:1]1
-f[call:2; len:1]2
-f[call:3; len:1]3
-f[call:4; len:1]4
-f[call:5; len:1]5
-f[call:6; len:1]6
-f[call:7; len:1]7
-f[call:8; len:1]8
-f[call:9; len:0]
+f[call:1; len:8]12345678
----( chunk_size: 2, output append size: 1 )----
f[call:1; len:2]12
@@ -93,9 +85,7 @@ f[call:1; len:8]12345678
f[call:1; len:8]12345678
----( chunk_size: 1, output append size: 4 )----
-f[call:1; len:4]1234
-f[call:2; len:4]5678
-f[call:3; len:0]
+f[call:1; len:8]12345678
----( chunk_size: 2, output append size: 4 )----
f[call:1; len:4]1234
diff --git a/tests/output/ob_start_basic_006.phpt b/tests/output/ob_start_basic_006.phpt
index ff7a0cd..e24ebd6 100644
--- a/tests/output/ob_start_basic_006.phpt
+++ b/tests/output/ob_start_basic_006.phpt
@@ -1,5 +1,5 @@
--TEST--
-ob_start(): ensure multiple buffer initialization with a single call using arrays is not supported on PHP6 (http://bugs.php.net/42641)
+ob_start(): multiple buffer initialization with a single call, using arrays.
--FILE--
<?php
/*
@@ -72,37 +72,46 @@ var_dump(ob_start(array('f', 'C::g', array(array($c, "g"), array($c, "h")))));
checkAndClean();
?>
--EXPECTF--
- ---> Test arrays:
-Notice: ob_start(): failed to create buffer in %s on line 44
-bool(false)
+ ---> Test arrays:
+f[call:1; len:34] - bool(true)
Array
(
+ [0] => f
)
-Notice: ob_start(): failed to create buffer in %s on line 47
-bool(false)
+f[call:3; len:68] - f[call:2; len:47] - bool(true)
Array
(
+ [0] => f
+ [1] => f
)
-Notice: ob_start(): failed to create buffer in %s on line 50
-bool(false)
+
+f[call:5; len:150] - C::g[call:2; len:125] - f[call:4; len:103] - C::g[call:1; len:79] - bool(true)
Array
(
+ [0] => f
+ [1] => C::g
+ [2] => f
+ [3] => C::g
)
-Notice: ob_start(): failed to create buffer in %s on line 53
-bool(false)
+
+
+
+f[call:6; len:35] - bool(false)
Array
(
+ [0] => f
)
-Notice: ob_start(): failed to create buffer in %s on line 56
-bool(false)
+f[call:7; len:35] - bool(false)
Array
(
+ [0] => f
)
+
C::h[call:1; len:37; id:originalID] - bool(true)
Array
(
@@ -115,9 +124,11 @@ Array
[0] => C::h
)
-
-Notice: ob_start(): failed to create buffer in %s on line 68
-bool(false)
+f[call:8; len:175] - C::g[call:4; len:150] - C::g[call:3; len:125] - C::h[call:3; len:82; id:changedIDagain] - bool(true)
Array
(
-)
+ [0] => f
+ [1] => C::g
+ [2] => C::g
+ [3] => C::h
+) \ No newline at end of file
diff --git a/tests/output/ob_start_basic_unerasable_002.phpt b/tests/output/ob_start_basic_unerasable_002.phpt
index 21db1f3..2ffcbb9 100644
--- a/tests/output/ob_start_basic_unerasable_002.phpt
+++ b/tests/output/ob_start_basic_unerasable_002.phpt
@@ -21,13 +21,13 @@ var_dump(ob_get_level());
--EXPECTF--
[callback:1]All of the following calls will fail to clean/remove the topmost buffer:
-Notice: ob_clean(): failed to delete buffer of callback (0) in %s on line 11
+Notice: ob_clean(): failed to delete buffer callback. in %s on line 11
bool(false)
-Notice: ob_end_clean(): failed to discard buffer of callback (0) in %s on line 12
+Notice: ob_end_clean(): failed to delete buffer callback. in %s on line 12
bool(false)
-Notice: ob_end_flush(): failed to send buffer of callback (0) in %s on line 13
+Notice: ob_end_flush(): failed to delete buffer callback. in %s on line 13
bool(false)
The OB nesting will still be 1 level deep:
int(1) \ No newline at end of file
diff --git a/tests/output/ob_start_basic_unerasable_003.phpt b/tests/output/ob_start_basic_unerasable_003.phpt
index 6eb6418..d201414 100644
--- a/tests/output/ob_start_basic_unerasable_003.phpt
+++ b/tests/output/ob_start_basic_unerasable_003.phpt
@@ -10,13 +10,12 @@ function callback($string) {
ob_start('callback', 0, false);
-echo "This call will obtain the content, but will not clean the buffer.";
+echo "This call will fail to obtain the content, since it is also requesting a clean:\n";
$str = ob_get_clean();
var_dump($str);
?>
--EXPECTF--
-[callback:1]This call will obtain the content, but will not clean the buffer.
-Notice: ob_get_clean(): failed to discard buffer of callback (0) in %s on line 11
+[callback:1]This call will fail to obtain the content, since it is also requesting a clean:
-Notice: ob_get_clean(): failed to delete buffer of callback (0) in %s on line 11
-string(65) "This call will obtain the content, but will not clean the buffer." \ No newline at end of file
+Notice: ob_get_clean(): failed to delete buffer callback. in %s on line 11
+bool(false) \ No newline at end of file
diff --git a/tests/output/ob_start_basic_unerasable_004.phpt b/tests/output/ob_start_basic_unerasable_004.phpt
index 62d9756..6669856 100644
--- a/tests/output/ob_start_basic_unerasable_004.phpt
+++ b/tests/output/ob_start_basic_unerasable_004.phpt
@@ -10,13 +10,12 @@ function callback($string) {
ob_start('callback', 0, false);
-echo "This call will obtain the content, but will not flush the buffer.";
+echo "This call will fail to flush and fail to obtain the content:\n";
$str = ob_get_flush();
var_dump($str);
?>
--EXPECTF--
-[callback:1]This call will obtain the content, but will not flush the buffer.
-Notice: ob_get_flush(): failed to send buffer of callback (0) in %s on line 11
+[callback:1]This call will fail to flush and fail to obtain the content:
-Notice: ob_get_flush(): failed to delete buffer of callback (0) in %s on line 11
-string(65) "This call will obtain the content, but will not flush the buffer." \ No newline at end of file
+Notice: ob_get_flush(): failed to delete buffer callback. in %s on line 11
+bool(false)
diff --git a/tests/output/ob_start_basic_unerasable_005.phpt b/tests/output/ob_start_basic_unerasable_005.phpt
index 2c52f00..7be71e5 100644
--- a/tests/output/ob_start_basic_unerasable_005.phpt
+++ b/tests/output/ob_start_basic_unerasable_005.phpt
@@ -17,9 +17,9 @@ var_dump(ob_get_contents());
?>
--EXPECTF--
[callback:1]Attempt to flush unerasable buffer - should fail...
-Notice: ob_flush(): failed to flush buffer of callback (0) in %s on line 11
+Notice: ob_flush(): failed to flush buffer callback. in %s on line 11
bool(false)
string(%d) "Attempt to flush unerasable buffer - should fail...
-Notice: ob_flush(): failed to flush buffer of callback (0) in %s on line 11
+Notice: ob_flush(): failed to flush buffer callback. in %s on line 11
bool(false)
"
diff --git a/tests/output/ob_start_error_001.phpt b/tests/output/ob_start_error_001.phpt
index 0f6daf3..ca02801 100644
--- a/tests/output/ob_start_error_001.phpt
+++ b/tests/output/ob_start_error_001.phpt
@@ -30,22 +30,19 @@ var_dump(ob_start("justPrint", 0, "this should be a bool"));
?>
--EXPECTF--
+
- Too many arguments
Warning: ob_start() expects at most 3 parameters, 4 given in %s on line 17
-bool(false)
+NULL
- Arg 1 wrong type
-
-Notice: ob_start(): failed to create buffer in %s on line 20
-bool(false)
+bool(true)
- Arg 2 wrong type
Warning: ob_start() expects parameter 2 to be long, string given in %s on line 23
-bool(false)
+NULL
- Arg 3 wrong type
-
-Warning: ob_start() expects parameter 3 to be long, string given in %s on line 26
-bool(false)
+bool(true) \ No newline at end of file
diff --git a/tests/output/ob_start_error_002.phpt b/tests/output/ob_start_error_002.phpt
index 822aeb4..aca2ad9 100644
--- a/tests/output/ob_start_error_002.phpt
+++ b/tests/output/ob_start_error_002.phpt
@@ -20,15 +20,8 @@ var_dump(ob_start("no"));
echo "done"
?>
--EXPECTF--
-Notice: ob_start(): failed to create buffer in %s on line 13
bool(false)
-
-Notice: ob_start(): failed to create buffer in %s on line 14
bool(false)
-
-Notice: ob_start(): failed to create buffer in %s on line 15
bool(false)
-
-Notice: ob_start(): failed to create buffer in %s on line 16
bool(false)
done \ No newline at end of file
diff --git a/tests/output/ob_start_error_003.phpt b/tests/output/ob_start_error_003.phpt
index 7bb88b4..ce2a249 100644
--- a/tests/output/ob_start_error_003.phpt
+++ b/tests/output/ob_start_error_003.phpt
@@ -15,6 +15,4 @@ var_dump(ob_start(array($c)));
echo "done"
?>
--EXPECTF--
-Notice: ob_start(): failed to create buffer in %s on line 11
-bool(false)
-done \ No newline at end of file
+Catchable fatal error: Object of class C could not be converted to string in %s on line 11 \ No newline at end of file
diff --git a/tests/output/ob_start_error_004.phpt b/tests/output/ob_start_error_004.phpt
index aeb5be9..ec6d44d 100644
--- a/tests/output/ob_start_error_004.phpt
+++ b/tests/output/ob_start_error_004.phpt
@@ -15,6 +15,4 @@ var_dump(ob_start(array($c, 'f')));
echo "done"
?>
--EXPECTF--
-Notice: ob_start(): failed to create buffer in %s on line 11
-bool(false)
-done \ No newline at end of file
+Catchable fatal error: Object of class C could not be converted to string in %s on line 11 \ No newline at end of file