summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikita Popov <nikic@php.net>2012-08-13 20:29:55 +0200
committerNikita Popov <nikic@php.net>2012-08-13 20:30:53 +0200
commit544f5ad35bfe8351ea3f0821a61d83ce9300457d (patch)
tree929e0a1a31165d1b015827531f7610503ddbcf26
parentbaea290b6c0843afb23bf9ea2979a8de15a406ce (diff)
downloadphp-git-544f5ad35bfe8351ea3f0821a61d83ce9300457d.tar.gz
Fix mcrypt_ecb tests after deprecation
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb.phpt6
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_3des_decrypt.phpt4
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_3des_encrypt.phpt2
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_error.phpt2
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_variation1.phpt4
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_variation2.phpt4
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_variation3.phpt4
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_variation4.phpt4
-rw-r--r--ext/mcrypt/tests/mcrypt_ecb_variation5.phpt4
9 files changed, 28 insertions, 6 deletions
diff --git a/ext/mcrypt/tests/mcrypt_ecb.phpt b/ext/mcrypt/tests/mcrypt_ecb.phpt
index e75d9fa6cd..b6d0a22786 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 7a5cc27f44..82f9608da8 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 da26b4ba83..50107b4b0f 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 b33034afcb..7e521f2225 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 282a0cce1d..7271deec13 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 49e0a551f8..ed57400e0f 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 cedda4930a..2999304563 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 599b4fbe70..e52040e295 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 f64744fcdf..3f4f7f5ddb 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";
}