From 661bfe9a89784e1a04b550cfe117c1582c91d24f Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 28 Aug 2015 16:50:51 +1200 Subject: [PATCH] Comply with moved use_test_manifest() method Moved from TestRunner to SapphireTest in 4.0. --- .../BehatExtension/Compiler/CoreInitializationPass.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/SilverStripe/BehatExtension/Compiler/CoreInitializationPass.php b/src/SilverStripe/BehatExtension/Compiler/CoreInitializationPass.php index ac3be2f..7db3c67 100644 --- a/src/SilverStripe/BehatExtension/Compiler/CoreInitializationPass.php +++ b/src/SilverStripe/BehatExtension/Compiler/CoreInitializationPass.php @@ -21,7 +21,14 @@ class CoreInitializationPass implements CompilerPassInterface $frameworkPath = $container->getParameter('behat.silverstripe_extension.framework_path'); $_GET['flush'] = 1; require_once $frameworkPath . '/core/Core.php'; - \TestRunner::use_test_manifest(); + + if(class_exists('TestRunner')) { + // 3.x compat + \TestRunner::use_test_manifest(); + } else { + \SapphireTest::use_test_manifest(); + } + unset($_GET['flush']); // Remove the error handler so that PHPUnit can add its own