Skip to content

Commit 106ee53

Browse files
committed
Remove usage/mentions of E_STRICT in tests.
1 parent 9c7e93a commit 106ee53

28 files changed

+33
-110
lines changed

Zend/tests/ErrorException_getSeverity.phpt

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -192,18 +192,6 @@ try {
192192
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
193193
}
194194

195-
try {
196-
throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_STRICT);
197-
} catch(ErrorException $e) {
198-
echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
199-
var_dump($e->getSeverity() === E_STRICT);
200-
var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
201-
var_dump($e->getCode() === 0);
202-
var_dump($e->getPrevious() === NULL);
203-
var_dump($e->getFile() === __FILE__);
204-
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
205-
}
206-
207195
try {
208196
throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_RECOVERABLE_ERROR);
209197
} catch(ErrorException $e) {
@@ -384,18 +372,6 @@ try {
384372
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
385373
}
386374

387-
try {
388-
throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_STRICT, __FILE__);
389-
} catch(ErrorException $e) {
390-
echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
391-
var_dump($e->getSeverity() === E_STRICT);
392-
var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
393-
var_dump($e->getCode() === 0);
394-
var_dump($e->getPrevious() === NULL);
395-
var_dump($e->getFile() === __FILE__);
396-
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
397-
}
398-
399375
try {
400376
throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_RECOVERABLE_ERROR, __FILE__);
401377
} catch(ErrorException $e) {
@@ -576,18 +552,6 @@ try {
576552
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
577553
}
578554

579-
try {
580-
throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_STRICT, __FILE__, __LINE__);
581-
} catch(ErrorException $e) {
582-
echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
583-
var_dump($e->getSeverity() === E_STRICT);
584-
var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
585-
var_dump($e->getCode() === 0);
586-
var_dump($e->getPrevious() === NULL);
587-
var_dump($e->getFile() === __FILE__);
588-
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
589-
}
590-
591555
try {
592556
throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_RECOVERABLE_ERROR, __FILE__, __LINE__);
593557
} catch(ErrorException $e) {
@@ -813,22 +777,6 @@ try {
813777
}
814778
}
815779

816-
try {
817-
throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_STRICT, __FILE__, __LINE__, NULL);
818-
} catch(Exception $exceptionErr) {
819-
try {
820-
throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_STRICT, __FILE__, __LINE__, $exceptionErr->getPrevious());
821-
} catch(ErrorException $e) {
822-
echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
823-
var_dump($e->getSeverity() === E_STRICT);
824-
var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
825-
var_dump($e->getCode() === 0);
826-
var_dump($e->getPrevious() === NULL);
827-
var_dump($e->getFile() === __FILE__);
828-
var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
829-
}
830-
}
831-
832780
try {
833781
throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_RECOVERABLE_ERROR, __FILE__, __LINE__, NULL);
834782
} catch(Exception $exceptionErr) {
@@ -953,12 +901,6 @@ bool(true)
953901
bool(true)
954902
bool(true)
955903
bool(true)
956-
This exception severity is: 2048bool(true)
957-
bool(true)
958-
bool(true)
959-
bool(true)
960-
bool(true)
961-
bool(true)
962904
This exception severity is: 4096bool(true)
963905
bool(true)
964906
bool(true)
@@ -1049,12 +991,6 @@ bool(true)
1049991
bool(true)
1050992
bool(true)
1051993
bool(true)
1052-
This exception severity is: 2048bool(true)
1053-
bool(true)
1054-
bool(true)
1055-
bool(true)
1056-
bool(true)
1057-
bool(true)
1058994
This exception severity is: 4096bool(true)
1059995
bool(true)
1060996
bool(true)
@@ -1145,12 +1081,6 @@ bool(true)
11451081
bool(true)
11461082
bool(true)
11471083
bool(true)
1148-
This exception severity is: 2048bool(true)
1149-
bool(true)
1150-
bool(true)
1151-
bool(true)
1152-
bool(true)
1153-
bool(true)
11541084
This exception severity is: 4096bool(true)
11551085
bool(true)
11561086
bool(true)
@@ -1241,12 +1171,6 @@ bool(true)
12411171
bool(true)
12421172
bool(true)
12431173
bool(true)
1244-
This exception severity is: 2048bool(true)
1245-
bool(true)
1246-
bool(true)
1247-
bool(true)
1248-
bool(true)
1249-
bool(true)
12501174
This exception severity is: 4096bool(true)
12511175
bool(true)
12521176
bool(true)

Zend/tests/bug33771.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Bug #33771 (error_reporting falls to 0 when @ was used inside try/catch block)
33
--FILE--
44
<?php
55

6-
error_reporting(E_ALL | E_STRICT);
6+
error_reporting(E_ALL | E_NOTICE);
77

88
var_dump(error_reporting());
99

@@ -14,7 +14,7 @@ function make_exception()
1414

1515
function make_exception_and_change_err_reporting()
1616
{
17-
error_reporting(E_ALL & ~E_STRICT);
17+
error_reporting(E_ALL & ~E_NOTICE);
1818
throw new Exception();
1919
}
2020

@@ -36,5 +36,5 @@ echo "Done\n";
3636
--EXPECT--
3737
int(32767)
3838
int(32767)
39-
int(30719)
39+
int(32759)
4040
Done

Zend/tests/bug52160.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Bug #52160 (Invalid E_STRICT redefined constructor error)
2+
Bug #52160 (Invalid E_DEPRECATED redefined constructor error)
33
--FILE--
44
<?php
55

Zend/tests/bug62956.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Bug #62956: "incompatible" signatures for private methods should not cause E_STRICT
2+
Bug #62956: "incompatible" signatures for private methods should not cause E_WARNING
33
--FILE--
44
<?php
55
class Base

Zend/tests/bug64988.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
Bug #64988 (Class loading order affects E_STRICT warning)
2+
Bug #64988 (Class loading order affects E_WARNING warning)
33
--FILE--
44
<?php
55
abstract class Base1 {

Zend/tests/bug67436/bug67436_nohandler.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--TEST--
2-
bug67436: E_STRICT instead of custom error handler
2+
bug67436: E_WARNING instead of custom error handler
33
--FILE--
44
<?php
55

Zend/tests/error_reporting02.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function foo($arg) {
99
}
1010

1111
function bar() {
12-
error_reporting(E_ALL|E_STRICT);
12+
error_reporting(E_ALL|E_DEPRECATED);
1313
throw new Exception("test");
1414
}
1515

Zend/tests/error_reporting03.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function bar() {
1616

1717
function foo1() {
1818
echo $undef1;
19-
error_reporting(E_ALL|E_STRICT);
19+
error_reporting(E_ALL|E_DEPRECATED);
2020
echo $undef2;
2121
}
2222

Zend/tests/error_reporting04.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ error_reporting(E_ALL);
77

88
function foo() {
99
echo $undef;
10-
error_reporting(E_ALL|E_STRICT);
10+
error_reporting(E_ALL|E_DEPRECATED);
1111
}
1212

1313

Zend/tests/error_reporting08.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function foo2($arg) {
1212
}
1313

1414
function foo3() {
15-
error_reporting(E_ALL|E_STRICT);
15+
error_reporting(E_ALL|E_DEPRECATED);
1616
echo $undef3;
1717
throw new Exception("test");
1818
}

Zend/tests/error_reporting09.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function bar() {
1212

1313
function foo() {
1414
echo @$undef;
15-
error_reporting(E_ALL|E_STRICT);
15+
error_reporting(E_ALL|E_DEPRECATED);
1616
echo $blah;
1717
return bar();
1818
}

Zend/tests/exception_004.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Throwing exception using a class that isn't derived from the Exception base clas
33
--FILE--
44
<?php
55

6-
error_reporting(E_ALL|E_STRICT);
6+
error_reporting(E_ALL);
77

88
class Foo { }
99

ext/pdo_mysql/tests/pdo_mysql_subclass.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ MySQLPDOTest::skip();
1111
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
1212

1313
// No silly strict mode warnings, please!
14-
error_reporting(E_ALL^E_STRICT);
14+
error_reporting(E_ALL);
1515
ini_set('display_errors', false);
1616

1717
try {

ext/pdo_pgsql/tests/bug72294.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class PHPUnit_Framework_TestResult
7474

7575
$oldErrorHandler = set_error_handler(
7676
'handleError',
77-
E_ALL | E_STRICT
77+
E_ALL
7878
);
7979

8080
try {

ext/soap/tests/bugs/bug46427.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Bug #46427 (SoapClient() stumbles over its "stream_context" parameter)
44
<?php require_once('skipif.inc'); ?>
55
--FILE--
66
<?php
7-
error_reporting(E_ALL|E_STRICT);
7+
error_reporting(E_ALL);
88

99
function getSoapClient_1() {
1010
$ctx = stream_context_create();

ext/standard/tests/general_functions/parse_ini_booleans.data

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ foo = E_ALL E_NOTICE
33
error_reporting = E_ALL
44
error_reporting1 = E_COMPILE_ERROR|E_RECOVERABLE_ERROR |E_ERROR|E_CORE_ERROR
55
error_reporting2 = E_ALL&~E_NOTICE
6-
error_reporting3 = E_ALL & ~E_NOTICE
7-
error_reporting4 = E_ALL & ~E_NOTICE | E_STRICT
6+
error_reporting3 = E_ALL & ~E_NOTICE
87

98
['true or false']
109
bool_true = true

ext/standard/tests/general_functions/parse_ini_booleans.phpt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ echo "Done.\n";
1313
--EXPECT--
1414
array(3) {
1515
["error_reporting values"]=>
16-
array(6) {
16+
array(5) {
1717
["foo"]=>
1818
string(7) "32767 8"
1919
["error_reporting"]=>
@@ -24,8 +24,6 @@ array(3) {
2424
string(5) "32759"
2525
["error_reporting3"]=>
2626
string(5) "32759"
27-
["error_reporting4"]=>
28-
string(5) "32759"
2927
}
3028
["true or false"]=>
3129
array(8) {

ext/standard/tests/mail/mail_basic_alt1-win32.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ max_execution_time = 120
1919
* Alias to functions:
2020
*/
2121

22-
error_reporting(E_ALL & ~E_STRICT);
22+
error_reporting(E_ALL);
2323
ini_set("SMTP", "localhost");
2424
ini_set("smtp_port", 25);
2525
ini_set("sendmail_from", "user@example.com");

ext/standard/tests/mail/mail_basic_alt2-win32.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ max_execution_time = 120
1818
* Alias to functions:
1919
*/
2020

21-
error_reporting(E_ALL & ~E_STRICT);
21+
error_reporting(E_ALL);
2222

2323
echo "*** Testing mail() : basic functionality ***\n";
2424
require_once(__DIR__.'/mail_include.inc');

ext/standard/tests/mail/mail_basic_alt3-win32.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ max_execution_time = 120
1818
* Alias to functions:
1919
*/
2020

21-
error_reporting(E_ALL & ~E_STRICT);
21+
error_reporting(E_ALL);
2222

2323
echo "*** Testing mail() : basic functionality ***\n";
2424
require_once(__DIR__.'/mail_include.inc');

ext/standard/tests/mail/mail_basic_alt4-win32.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ max_execution_time = 120
1818
* Alias to functions:
1919
*/
2020

21-
error_reporting(E_ALL & ~E_STRICT);
21+
error_reporting(E_ALL);
2222

2323
echo "*** Testing mail() : basic functionality ***\n";
2424
require_once(__DIR__.'/mail_include.inc');

ext/standard/tests/mail/mail_variation_alt1-win32.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ max_execution_time = 120
1818
* Alias to functions:
1919
*/
2020

21-
error_reporting(E_ALL & ~E_STRICT);
21+
error_reporting(E_ALL);
2222
ini_set("SMTP", "localhost");
2323
ini_set("smtp_port", 2525);
2424
ini_set("sendmail_from", "user@example.com");

ext/standard/tests/mail/mail_variation_alt2-win32.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ max_execution_time = 120
1818
* Alias to functions:
1919
*/
2020

21-
error_reporting(E_ALL & ~E_STRICT);
21+
error_reporting(E_ALL);
2222
ini_set("SMTP", "localplace");
2323
ini_set("smtp_port", 25);
2424
ini_set("sendmail_from", "user@example.com");

ext/standard/tests/mail/mail_variation_alt3-win32.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ max_execution_time = 120
1818
* Alias to functions:
1919
*/
2020

21-
error_reporting(E_ALL & ~E_STRICT);
21+
error_reporting(E_ALL);
2222
ini_set("SMTP", "localhost");
2323
ini_set("smtp_port", 25);
2424

ext/standard/tests/strings/htmlentities08.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
htmlentities() test 8 (mbstring / EUC-JP)
33
--INI--
44
output_handler=
5-
error_reporting=~E_STRICT
65
internal_encoding=EUC-JP
76
--SKIPIF--
87
<?php
@@ -15,4 +14,6 @@ internal_encoding=EUC-JP
1514
?>
1615
--EXPECT--
1716
EUC-JP
17+
18+
Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s on line %d
1819
string(6) "¡¢¡£¡¤"

ext/standard/tests/strings/htmlentities09.phpt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
htmlentities() test 9 (mbstring / Shift_JIS)
33
--INI--
44
output_handler=
5-
error_reporting=~E_STRICT
65
internal_encoding=Shift_JIS
76
--SKIPIF--
87
<?php
@@ -16,5 +15,7 @@ internal_encoding=Shift_JIS
1615
===DONE===
1716
--EXPECT--
1817
SJIS
18+
19+
Notice: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s on line %d
1920
string(12) "814181428143"
2021
===DONE===

0 commit comments

Comments
 (0)