Skip to content

Instantly share code, notes, and snippets.

@Jeraimee
Created May 16, 2011 20:38
Show Gist options
  • Save Jeraimee/975322 to your computer and use it in GitHub Desktop.
Save Jeraimee/975322 to your computer and use it in GitHub Desktop.
Proper Test Patch
Index: ext/mcrypt/tests/bug46010.phpt
===================================================================
--- ext/mcrypt/tests/bug46010.phpt (revision 310977)
+++ ext/mcrypt/tests/bug46010.phpt (working copy)
@@ -1,5 +1,7 @@
--TEST--
Bug #46010 (warnings incorrectly generated for iv in ecb mode)
+--SKIPIF--
+<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
--FILE--
<?php
Index: tests/security/open_basedir_linkinfo.phpt
===================================================================
--- tests/security/open_basedir_linkinfo.phpt (revision 310977)
+++ tests/security/open_basedir_linkinfo.phpt (working copy)
@@ -57,8 +57,6 @@
Warning: symlink(): open_basedir restriction in effect. File(%s/test/bad/bad.txt) is not within the allowed path(s): (.) in %s on line %d
bool(false)
int(%d)
-
-Warning: unlink(): open_basedir restriction in effect. File(%s/test/ok/symlink.txt) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
+bool(true)
*** Finished testing open_basedir configuration [linkinfo] ***
Index: tests/security/open_basedir_readlink.phpt
===================================================================
--- tests/security/open_basedir_readlink.phpt (revision 310977)
+++ tests/security/open_basedir_readlink.phpt (working copy)
@@ -69,8 +69,6 @@
Warning: readlink(): open_basedir restriction in effect. File(%s/test/ok/symlink.txt) is not within the allowed path(s): (.) in %s on line %d
bool(false)
-
-Warning: unlink(): open_basedir restriction in effect. File(%s/test/ok/symlink.txt) is not within the allowed path(s): (.) in %s on line %d
-bool(false)
+bool(true)
*** Finished testing open_basedir configuration [readlink] ***
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment