Merge pull request #6871 from sminnee/better-sapphiretest-error

MINOR: Better error message in SapphireTest
This commit is contained in:
Damian Mooyman 2017-08-08 23:33:29 +12:00 committed by GitHub
commit 14d3567f90
1 changed files with 2 additions and 1 deletions

View File

@ -472,7 +472,8 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
*/
protected function getCurrentAbsolutePath() {
$filename = self::$test_class_manifest->getItemPath(get_class($this));
if(!$filename) throw new LogicException("getItemPath returned null for " . get_class($this));
if(!$filename) throw new LogicException("getItemPath returned null for " . get_class($this)
. ". Try adding flush=1 to the test run.");
return dirname($filename);
}