X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsimpletest%2Fsimpletest.module;h=35fdd92cc19d1e4fb67ad894ca593cfcf7c37347;hp=0814d882d7101ed22a46130614e71bb4f3b35f0a;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hpb=9424afc6c1f518c301bf87a23c047d1873435d05 diff --git a/web/core/modules/simpletest/simpletest.module b/web/core/modules/simpletest/simpletest.module index 0814d882d..35fdd92cc 100644 --- a/web/core/modules/simpletest/simpletest.module +++ b/web/core/modules/simpletest/simpletest.module @@ -855,6 +855,7 @@ function simpletest_phpunit_testcase_to_row($test_id, \SimpleXMLElement $testcas $attributes = $testcase->attributes(); + $function = $attributes->class . '->' . $attributes->name . '()'; $record = [ 'test_id' => $test_id, 'test_class' => (string) $attributes->class, @@ -862,9 +863,11 @@ function simpletest_phpunit_testcase_to_row($test_id, \SimpleXMLElement $testcas 'message' => $message, // @todo: Check on the proper values for this. 'message_group' => 'Other', - 'function' => $attributes->class . '->' . $attributes->name . '()', + 'function' => $function, 'line' => $attributes->line ?: 0, - 'file' => $attributes->file, + // There are situations when the file will not be present because a PHPUnit + // @requires has caused a test to be skipped. + 'file' => $attributes->file ?: $function, ]; return $record; }