mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: prevent TestRunner from dying when running through sake and loading FullTestSuite
This commit is contained in:
parent
6564fafa21
commit
60ea09bb42
@ -1,6 +1,4 @@
|
||||
<?php
|
||||
@require_once('sapphire/tests/bootstrap.php');
|
||||
|
||||
/**
|
||||
* Alternative to letting PHPUnit handle class retrieval via
|
||||
* traversing the filesystem. Works around restrictions of PHPUnit
|
||||
@ -29,6 +27,8 @@ class FullTestSuite {
|
||||
* @return PHPUnit_Framework_TestSuite
|
||||
*/
|
||||
public static function suite() {
|
||||
require_once('sapphire/tests/bootstrap.php');
|
||||
|
||||
$suite = new PHPUnit_Framework_TestSuite();
|
||||
if(isset($_GET['module'])) {
|
||||
$classList = self::get_module_tests($_GET['module']);
|
||||
@ -47,6 +47,8 @@ class FullTestSuite {
|
||||
* @return Array
|
||||
*/
|
||||
public static function get_all_tests() {
|
||||
require_once('sapphire/tests/bootstrap.php');
|
||||
|
||||
TestRunner::use_test_manifest();
|
||||
$tests = ClassInfo::subclassesFor('SapphireTest');
|
||||
array_shift($tests);
|
||||
@ -62,6 +64,8 @@ class FullTestSuite {
|
||||
* @return Array
|
||||
*/
|
||||
protected static function get_module_tests($namesStr) {
|
||||
require_once('sapphire/tests/bootstrap.php');
|
||||
|
||||
$tests = array();
|
||||
$names = explode(',', $namesStr);
|
||||
foreach($names as $name) {
|
||||
|
Loading…
Reference in New Issue
Block a user