Re: cvs: php-src /ext/standard/tests/file rename_basic.phpt rename_variation-win32.phpt rename_variation1-win32.phpt rename_variation2-win32.phpt
rename_variation3-win32.phpt rename_variation8.phpt rename_variation9.phpt

From: Date: Wed, 30 Apr 2008 15:08:58 +0000
Subject: Re: cvs: php-src /ext/standard/tests/file rename_basic.phpt rename_variation-win32.phpt rename_variation1-win32.phpt rename_variation2-win32.phpt
rename_variation3-win32.phpt rename_variation8.phpt rename_variation9.phpt
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-49773@lists.php.net to get a copy of this message
Ant Phillips wrote:
+// renaming existing file to numeric name +var_dump( rename($file_path."/rename_variation.tmp", $file_path."/12345") ); + +// ensure that rename worked fine +var_dump( file_exists($file_path."/rename_variation.tmp" ) ); // expecting false +var_dump( file_exists($file_path."/12345" ) ); // expecting true
We appreciate the new tests. It would make failed test results easier to understand if the section comments were echo statements, e.g. the snippet above would be: echo "renaming existing file to numeric name\n"; var_dump( rename($file_path."/rename_variation.tmp", $file_path."/12345") ); echo "ensure that rename worked fine\n"; var_dump( file_exists($file_path."/rename_variation.tmp" ) ); // expecting false var_dump( file_exists($file_path."/12345" ) ); // expecting true For tests with subtle variations, numbering the sections (in the echo statements) eases identification of failing statements. Chris -- Christopher Jones, Oracle Email: christopher.jones@oracle.com Tel: +1 650 506 8630 Blog: http://blogs.oracle.com/opal/ Free PHP Book: http://tinyurl.com/f8jad Follow me: http://friendfeed.com/ghrd

« previous php.cvs (#49773) next »