Project: moodle
Issue MDL-41419: core_files_externallib_testcase::test_get_files sporadically fails
This test keeps failing on the integration server because of minor time differences. # Ideally you would change the test so it doesn't depend on us having the two evaluations happen within 1 second of each other because that often leads to failures. # But also, your test data is wrong, its passing because php sucks, but as this diff below shows: ## {{'itemid' => 1}} should be {{'itemid' => '1'}} ## {{'isdir' => null}} should be {{'isdir' => false}} Output: {code} core_files_externallib_testcase::test_get_files Failed asserting that two arrays are equal. --- Expected +++ Actual @@ @@ 'filearea' => 'content' - 'itemid' => '1' + 'itemid' => 1 'filepath' => '/' 'filename' => 'Simple4.txt' 'url' => 'http://www.example.com/moodle...e4.txt' - 'isdir' => false - 'timemodified' => '1377497719' + 'isdir' => null + 'timemodified' => '1377497718' ) ) ) /var/lib/jenkins/git_repositories/master/files/tests/externallib_test.php:285 /var/lib/jenkins/git_repositories/master/lib/phpunit/classes/advanced_testcase.php:76 {code} http://integration.moodle.org/job/20.%20Run%20phpunit%20UnitTests%20(master)/1551/testReport/junit/(root)/core_files_externallib_testcase/test_get_files/
Story points: 2