com php-src: Fix mcrypt_ecb tests after deprecation: ext/mcrypt/tests/mcrypt_ecb.phpt ext/mcrypt/tests/mcry pt_ecb_3des_decrypt.phpt
ext/mcrypt/tests/mcrypt_ ecb_3des_encrypt.phpt ext/mcrypt/tests/mcrypt_ecb _error.phpt ext/mcrypt/tests/mcrypt_ecb_variation1 .phpt
ext/mcrypt/tests/mcrypt_ecb_variation2.phpt ext/mcrypt/tests/mcrypt_ecb_variation3.phpt ext/mc rypt/tests/mcrypt_ecb_variation4.phpt ext/mcrypt/test
s/mcrypt_ecb_variation5.phpt
| From: | Nikita Popov | Date: | Mon, 13 Aug 2012 18:30:53 +0000 |
| Subject: | com php-src: Fix mcrypt_ecb tests after deprecation: ext/mcrypt/tests/mcrypt_ecb.phpt ext/mcrypt/tests/mcry pt_ecb_3des_decrypt.phpt ext/mcrypt/tests/mcrypt_ ecb_3des_encrypt.phpt ext/mcrypt/tests/mcrypt_ecb _error.phpt ext/mcrypt/tests/mcrypt_ecb_variation1 .phpt ext/mcrypt/tests/mcrypt_ecb_variation2.phpt ext/mcrypt/tests/mcrypt_ecb_variation3.phpt ext/mc rypt/tests/mcrypt_ecb_variation4.phpt ext/mcrypt/test s/mcrypt_ecb_variation5.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-69820@lists.php.net to get a copy of this message | ||
Commit: 544f5ad35bfe8351ea3f0821a61d83ce9300457d
Author: Nikita Popov <nikic@php.net> Mon, 13 Aug 2012 20:29:55 +0200
Parents: baea290b6c0843afb23bf9ea2979a8de15a406ce
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=544f5ad35bfe8351ea3f0821a61d83ce9300457d
Log:
Fix mcrypt_ecb tests after deprecation
Changed paths:
M ext/mcrypt/tests/mcrypt_ecb.phpt
M ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt
M ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt
M ext/mcrypt/tests/mcrypt_ecb_error.phpt
M ext/mcrypt/tests/mcrypt_ecb_variation1.phpt
M ext/mcrypt/tests/mcrypt_ecb_variation2.phpt
M ext/mcrypt/tests/mcrypt_ecb_variation3.phpt
M ext/mcrypt/tests/mcrypt_ecb_variation4.phpt
M ext/mcrypt/tests/mcrypt_ecb_variation5.phpt
Diff:
diff --git a/ext/mcrypt/tests/mcrypt_ecb.phpt b/ext/mcrypt/tests/mcrypt_ecb.phpt
index e75d9fa..b6d0a22 100644
--- a/ext/mcrypt/tests/mcrypt_ecb.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb.phpt
@@ -18,4 +18,10 @@ echo trim(mcrypt_ecb($cipher, $key, $enc_data, MCRYPT_DECRYPT, $iv)) .
"\n";
mcrypt_ecb($cipher, $key, $enc_data, MCRYPT_DECRYPT);
--EXPECTF--
+
+Deprecated: Function mcrypt_ecb() is deprecated in %s on line %d
+
+Deprecated: Function mcrypt_ecb() is deprecated in %s on line %d
PHP Testfest 2008
+
+Deprecated: Function mcrypt_ecb() is deprecated in %s on line %d
diff --git a/ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt
b/ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt
index 7a5cc27..82f9608 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
?>
--FILE--
<?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
/* Prototype : string mcrypt_ecb(int cipher, string key, string data, int mode, string iv)
* Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv
* Source code: ext/mcrypt/mcrypt.c
@@ -94,4 +96,4 @@ string(32) "736563726574206d6573736167650000"
iv length=9
string(32) "736563726574206d6573736167650000"
-===DONE===
\ No newline at end of file
+===DONE===
diff --git a/ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt
b/ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt
index da26b4b..50107b4 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
?>
--FILE--
<?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
/* Prototype : string mcrypt_ecb(int cipher, string key, string data, int mode, string iv)
* Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv
* Source code: ext/mcrypt/mcrypt.c
diff --git a/ext/mcrypt/tests/mcrypt_ecb_error.phpt b/ext/mcrypt/tests/mcrypt_ecb_error.phpt
index b33034a..7e521f2 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_error.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_error.phpt
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
?>
--FILE--
<?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
/* Prototype : string mcrypt_ecb(int cipher, string key, string data, int mode, string iv)
* Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv
* Source code: ext/mcrypt/mcrypt.c
diff --git a/ext/mcrypt/tests/mcrypt_ecb_variation1.phpt
b/ext/mcrypt/tests/mcrypt_ecb_variation1.phpt
index 282a0cc..7271dee 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_variation1.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_variation1.phpt
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
?>
--FILE--
<?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
/* Prototype : string mcrypt_ecb(string cipher, string key, string data, int mode, string iv)
* Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv
* Source code: ext/mcrypt/mcrypt.c
@@ -18,7 +20,7 @@ echo "*** Testing mcrypt_ecb() : usage variation ***\n";
// Define error handler
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
+ if ($err_no & error_reporting()) {
// report non-silenced errors
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
}
diff --git a/ext/mcrypt/tests/mcrypt_ecb_variation2.phpt
b/ext/mcrypt/tests/mcrypt_ecb_variation2.phpt
index 49e0a55..ed57400 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_variation2.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_variation2.phpt
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
?>
--FILE--
<?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
/* Prototype : string mcrypt_ecb(string cipher, string key, string data, int mode, string iv)
* Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv
* Source code: ext/mcrypt/mcrypt.c
@@ -18,7 +20,7 @@ echo "*** Testing mcrypt_ecb() : usage variation ***\n";
// Define error handler
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
+ if ($err_no & error_reporting()) {
// report non-silenced errors
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
}
diff --git a/ext/mcrypt/tests/mcrypt_ecb_variation3.phpt
b/ext/mcrypt/tests/mcrypt_ecb_variation3.phpt
index cedda49..2999304 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_variation3.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_variation3.phpt
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
?>
--FILE--
<?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
/* Prototype : string mcrypt_ecb(string cipher, string key, string data, int mode, string iv)
* Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv
* Source code: ext/mcrypt/mcrypt.c
@@ -18,7 +20,7 @@ echo "*** Testing mcrypt_ecb() : usage variation ***\n";
// Define error handler
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
+ if ($err_no & error_reporting()) {
// report non-silenced errors
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
}
diff --git a/ext/mcrypt/tests/mcrypt_ecb_variation4.phpt
b/ext/mcrypt/tests/mcrypt_ecb_variation4.phpt
index 599b4fb..e52040e 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_variation4.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_variation4.phpt
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
?>
--FILE--
<?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
/* Prototype : string mcrypt_ecb(string cipher, string key, string data, int mode, string iv)
* Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv
* Source code: ext/mcrypt/mcrypt.c
@@ -18,7 +20,7 @@ echo "*** Testing mcrypt_ecb() : usage variation ***\n";
// Define error handler
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
+ if ($err_no & error_reporting()) {
// report non-silenced errors
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
}
diff --git a/ext/mcrypt/tests/mcrypt_ecb_variation5.phpt
b/ext/mcrypt/tests/mcrypt_ecb_variation5.phpt
index f64744f..3f4f7f5 100644
--- a/ext/mcrypt/tests/mcrypt_ecb_variation5.phpt
+++ b/ext/mcrypt/tests/mcrypt_ecb_variation5.phpt
@@ -8,6 +8,8 @@ if (!extension_loaded("mcrypt")) {
?>
--FILE--
<?php
+error_reporting(E_ALL & ~E_DEPRECATED);
+
/* Prototype : string mcrypt_ecb(string cipher, string key, string data, int mode, string iv)
* Description: ECB crypt/decrypt data using key key with cipher cipher starting with iv
* Source code: ext/mcrypt/mcrypt.c
@@ -18,7 +20,7 @@ echo "*** Testing mcrypt_ecb() : usage variation ***\n";
// Define error handler
function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
+ if ($err_no & error_reporting()) {
// report non-silenced errors
echo "Error: $err_no - $err_msg, $filename($linenum)\n";
}