first monkeypatch of zend test

This test keeps making a file in my directory :(. How does this look for a monkeypatching setup?
Esse commit está contido em:
ptarjan
2013-04-01 01:03:36 -07:00
commit de Sara Golemon
commit 0defae9799
2 arquivos alterados com 5 adições e 2 exclusões
+1
Ver Arquivo
@@ -1,4 +1,5 @@
<?php
file_put_contents('test.php',str_repeat('passed, ',1024));
require('test.php');
unlink('test.php');
?>
+4 -2
Ver Arquivo
@@ -52,8 +52,10 @@ def walk(filename):
test_files.append(full_dest_filename)
if '%s' in exp:
exp = exp.replace('in %s on', 'in %s/%s on' % ('hphp/test/zend/bad', dest_filename))
if 'bug60771.php' in full_dest_filename:
test = test.replace("?>", "unlink('test.php');\n?>")
exp = exp.replace('in %s on', 'in %s/%s on' % ('hphp/test/zend/bad', dest_filename))
# PHP puts a newline in that we don't
exp = exp.replace('\n\nFatal error:', '\nFatal error:')