[wp-trac] [WordPress Unit Tests] #138: Last test_wp_unique_filename() test fails when space is in path

WordPress Trac noreply at wordpress.org
Wed Oct 31 21:29:22 UTC 2012


#138: Last test_wp_unique_filename() test fails when space is in path
--------------------------+---------------------
 Reporter:  Viper007Bond  |       Type:  defect
   Status:  new           |   Priority:  normal
Milestone:                |  Component:  Uploads
 Keywords:  needs-patch   |
--------------------------+---------------------
 My `htdocs` location is in my Dropbox folder, so my unit tests have this
 path:

 {{{
 D:\My Documents\Dropbox\htdocs\wordpress-unit-tests\
 }}}

 So when this last test of using the full path to the image as the actual
 filename of the image runs:

 {{{
 $testdir.'test-image-with-path.png',
 }}}

 The space in the path (now filename) get converted to a dash which makes
 the test fail:


 {{{
 1) Tests_Functions::test_wp_unique_filename
 D:\My Documents\Dropbox\htdocs\wordpress-unit-
 tests\includes/../data/images/test-image-with-path.png
 Failed asserting that two strings are equal.
 --- Expected
 +++ Actual
 @@ @@
 -'DMyDocumentsDropboxhtdocswordpress-unit-testsincludes..dataimagestest-
 image-with-path.png'
 +'DMy-DocumentsDropboxhtdocswordpress-unit-testsincludes..dataimagestest-
 image-with-path.png'

 D:\My Documents\Dropbox\htdocs\wordpress-unit-tests\testsfunctions.php:199
 }}}

-- 
Ticket URL: <http://unit-tests.trac.wordpress.org/ticket/138>
WordPress Unit Tests <http://unit-tests.trac.wordpress.org>
My example project


More information about the wp-trac mailing list