Update template path to allow PageController test to pass

This commit is contained in:
Dylan Wagstaff 2017-10-05 15:26:52 +13:00
parent 36a5840d45
commit 18296d00e4

View File

@ -19,12 +19,7 @@ class TestPageController extends PageController implements TestOnly
*/ */
public function getViewer($action) public function getViewer($action)
{ {
if (file_exists('widgets')) { SSViewer::add_themes(['silverstripe/widgets:/tests/WidgetControllerTest']);
SSViewer::add_themes(['silverstripe/widgets:tests/WidgetControllerTest']);
} else {
// When installed as the root project, e.g. Travis
SSViewer::add_themes(['tests/WidgetControllerTest']);
}
return new SSViewer(TestPage::class); return new SSViewer(TestPage::class);
} }
} }