From 018ea24ce8b31e12ff56b15143dae89091ff592f Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 4 May 2017 14:00:24 +1200 Subject: [PATCH] MINOR: Better error message in SapphireTest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This error usually occurs when you've added a module but haven't run flush on your test classes. I’ve made the error message more explicit. --- dev/SapphireTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/SapphireTest.php b/dev/SapphireTest.php index 21df46c13..97a3d8fc3 100644 --- a/dev/SapphireTest.php +++ b/dev/SapphireTest.php @@ -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); }