Sorry for the long delay for awnsering.
Just a guess, but do you use Mac OS X locally?
Mac OS X returns lists in alphabetical order, but on linux the file system lists files in a random order.
In your tests error message, you can see that each file read was getting the opposite of what it expects, index
or sub page
, leading me to believe that the tests failing due to directory listing coming in a random error( The other times when it passes the file system returns the two files in the correct order). I don't know any phpunit so I can't help you with the specifics unfortunately.