mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Better error message in SapphireTest
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.
This commit is contained in:
parent
d119272b92
commit
018ea24ce8
@ -472,7 +472,8 @@ class SapphireTest extends PHPUnit_Framework_TestCase {
|
|||||||
*/
|
*/
|
||||||
protected function getCurrentAbsolutePath() {
|
protected function getCurrentAbsolutePath() {
|
||||||
$filename = self::$test_class_manifest->getItemPath(get_class($this));
|
$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);
|
return dirname($filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user