diff options
| author | Ondřej Surý <ondrej@sury.org> | 2011-02-16 10:13:02 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2011-02-16 10:13:02 +0100 |
| commit | fd5a0b31640419ca63d1ddeaffd6d3cf2a741814 (patch) | |
| tree | bfd17d84c5181d7b98d7d66f56573f4fc897e31c /tests/output | |
| parent | 01fcdff3849c3691d9aaeaab735846ab6d8895ca (diff) | |
| download | php-upstream/5.3.5.tar.gz | |
Imported Upstream version 5.3.5upstream/5.3.5
Diffstat (limited to 'tests/output')
| -rw-r--r-- | tests/output/bug46897.phpt | 4 | ||||
| -rw-r--r-- | tests/output/ob_clean_basic_001.phpt | 4 | ||||
| -rw-r--r-- | tests/output/ob_end_clean_basic_001.phpt | 4 | ||||
| -rw-r--r-- | tests/output/ob_end_flush_basic_001.phpt | 6 | ||||
| -rw-r--r-- | tests/output/ob_flush_basic_001.phpt | 4 | ||||
| -rw-r--r-- | tests/output/ob_get_level_basic_001.phpt | 4 | ||||
| -rw-r--r-- | tests/output/ob_start_basic_unerasable_002.phpt | 8 | ||||
| -rw-r--r-- | tests/output/ob_start_basic_unerasable_003.phpt | 4 | ||||
| -rw-r--r-- | tests/output/ob_start_basic_unerasable_004.phpt | 2 | ||||
| -rw-r--r-- | tests/output/ob_start_basic_unerasable_005.phpt | 4 | ||||
| -rw-r--r-- | tests/output/ob_start_callbacks.phpt | 39 |
11 files changed, 61 insertions, 22 deletions
diff --git a/tests/output/bug46897.phpt b/tests/output/bug46897.phpt index 6cfb10253..a77db91d3 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 callback. 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 callback. 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_clean_basic_001.phpt b/tests/output/ob_clean_basic_001.phpt index c93bea358..afaa7e2f4 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
\ No newline at end of file +Done diff --git a/tests/output/ob_end_clean_basic_001.phpt b/tests/output/ob_end_clean_basic_001.phpt index 0b694e36c..54e840bdb 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 7515face0..cba780276 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
\ No newline at end of file +Done diff --git a/tests/output/ob_flush_basic_001.phpt b/tests/output/ob_flush_basic_001.phpt index 91fb69526..57de5e31a 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
\ No newline at end of file +Done diff --git a/tests/output/ob_get_level_basic_001.phpt b/tests/output/ob_get_level_basic_001.phpt index 78217e4a4..65f329135 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
\ No newline at end of file +Done diff --git a/tests/output/ob_start_basic_unerasable_002.phpt b/tests/output/ob_start_basic_unerasable_002.phpt index 2ffcbb9dc..3b8bd637e 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 callback. 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 delete buffer callback. 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 delete buffer callback. 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 +int(1) diff --git a/tests/output/ob_start_basic_unerasable_003.phpt b/tests/output/ob_start_basic_unerasable_003.phpt index d20141453..e35902c89 100644 --- a/tests/output/ob_start_basic_unerasable_003.phpt +++ b/tests/output/ob_start_basic_unerasable_003.phpt @@ -17,5 +17,5 @@ var_dump($str); --EXPECTF-- [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 callback. in %s on line 11 -bool(false)
\ No newline at end of file +Notice: ob_get_clean(): failed to delete buffer callback in %s on line 11 +bool(false) diff --git a/tests/output/ob_start_basic_unerasable_004.phpt b/tests/output/ob_start_basic_unerasable_004.phpt index 6669856d6..081875a78 100644 --- a/tests/output/ob_start_basic_unerasable_004.phpt +++ b/tests/output/ob_start_basic_unerasable_004.phpt @@ -17,5 +17,5 @@ var_dump($str); --EXPECTF-- [callback:1]This call will fail to flush and fail to obtain the content: -Notice: ob_get_flush(): failed to delete buffer callback. in %s on line 11 +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 7be71e5aa..f1af201e6 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 callback. 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 callback. 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_callbacks.phpt b/tests/output/ob_start_callbacks.phpt new file mode 100644 index 000000000..da52d85f7 --- /dev/null +++ b/tests/output/ob_start_callbacks.phpt @@ -0,0 +1,39 @@ +--TEST-- +Test ob_start() with callbacks in variables +--FILE-- +<?php + +// Closure in variable +$a = function ($s) { return strtoupper($s); }; +ob_start($a); +echo 'closure in variable', "\n"; +ob_end_flush(); + +// Object (array) in variable +class foo { + static function out($foo) { + return strtoupper($foo); + } +} +$a = array('foo', 'out'); +ob_start($a); +echo 'object in variable', "\n"; +ob_end_flush(); + +// Object with static array +ob_start(array('foo', 'out')); +echo 'object via static array', "\n"; +ob_end_flush(); + +function my_strtoupper($foo, $bar) { + return strtoupper($foo); +} +$a = 'my_strtoupper'; +ob_start($a); +echo 'function via variable', "\n"; +ob_end_flush(); +--EXPECT-- +CLOSURE IN VARIABLE +OBJECT IN VARIABLE +OBJECT VIA STATIC ARRAY +FUNCTION VIA VARIABLE |
