diff options
| author | Anthony Ferrara <ircmaxell@gmail.com> | 2015-02-20 11:43:18 -0500 |
|---|---|---|
| committer | Anthony Ferrara <ircmaxell@gmail.com> | 2015-02-20 11:43:18 -0500 |
| commit | e3b020b945582a45465ae2ae145af9c250be9e54 (patch) | |
| tree | 34c0cfee6a81a15fb2544625d57ac6a360f49953 /ext/mbstring | |
| parent | cfae254b6b3966f4c1438563eb066de1c434616b (diff) | |
| download | php-git-e3b020b945582a45465ae2ae145af9c250be9e54.tar.gz | |
Fix declare error behavior so that improper usages will actually error
Diffstat (limited to 'ext/mbstring')
| -rw-r--r-- | ext/mbstring/tests/zend_multibyte-10.phpt | 2 | ||||
| -rw-r--r-- | ext/mbstring/tests/zend_multibyte-11.phpt | 2 | ||||
| -rw-r--r-- | ext/mbstring/tests/zend_multibyte-15.phpt | 16 | ||||
| -rw-r--r-- | ext/mbstring/tests/zend_multibyte-16.phpt | 14 |
4 files changed, 32 insertions, 2 deletions
diff --git a/ext/mbstring/tests/zend_multibyte-10.phpt b/ext/mbstring/tests/zend_multibyte-10.phpt index 138b4899fe..ef8ce9d0bc 100644 --- a/ext/mbstring/tests/zend_multibyte-10.phpt +++ b/ext/mbstring/tests/zend_multibyte-10.phpt @@ -9,4 +9,4 @@ declare(encoding="ISO-8859-1"); echo "ok\n"; ?> --EXPECTF-- -ok +ok
\ No newline at end of file diff --git a/ext/mbstring/tests/zend_multibyte-11.phpt b/ext/mbstring/tests/zend_multibyte-11.phpt index 6844d06370..0f9874b538 100644 --- a/ext/mbstring/tests/zend_multibyte-11.phpt +++ b/ext/mbstring/tests/zend_multibyte-11.phpt @@ -10,4 +10,4 @@ declare(encoding="ISO-8859-15") { } ?> --EXPECTF-- -ok +Fatal error: Encoding declaration pragma must be the very first statement in the script in %s on line %d
\ No newline at end of file diff --git a/ext/mbstring/tests/zend_multibyte-15.phpt b/ext/mbstring/tests/zend_multibyte-15.phpt new file mode 100644 index 0000000000..6995444bbb --- /dev/null +++ b/ext/mbstring/tests/zend_multibyte-15.phpt @@ -0,0 +1,16 @@ +--TEST-- +zend multibyte (15) +--INI-- +zend.multibyte=1 +--FILE-- +<?php +declare(encoding="ISO-8859-15") { + echo "ok\n"; +} +declare(encoding="UTF-8") { + echo "ok\n"; +} +?> +--EXPECTF-- +ok +ok
\ No newline at end of file diff --git a/ext/mbstring/tests/zend_multibyte-16.phpt b/ext/mbstring/tests/zend_multibyte-16.phpt new file mode 100644 index 0000000000..4470e3a87f --- /dev/null +++ b/ext/mbstring/tests/zend_multibyte-16.phpt @@ -0,0 +1,14 @@ +--TEST-- +zend multibyte (16) +--INI-- +zend.multibyte=1 +--FILE-- +<?php +declare(encoding="ISO-8859-15") { + echo "ok\n"; +} +echo "ok\n"; +?> +--EXPECTF-- +ok +ok
\ No newline at end of file |
