File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -75,13 +75,22 @@ class TestManager {
75
75
*/
76
76
protected $ _fixtureManager = null ;
77
77
78
+ /**
79
+ * Params to configure test runner
80
+ *
81
+ * @var CakeFixtureManager
82
+ */
83
+ public $ params = array ();
84
+
78
85
/**
79
86
* Constructor for the TestManager class
80
87
*
81
88
* @return void
82
89
*/
83
90
public function __construct ($ params = array ()) {
84
91
require_once (CAKE_TESTS_LIB . 'cake_test_case.php ' );
92
+
93
+ $ this ->params = $ params ;
85
94
if (isset ($ params ['app ' ])) {
86
95
$ this ->appTest = true ;
87
96
}
@@ -130,14 +139,7 @@ public function runAllTests(&$reporter) {
130
139
* @return mixed Result of test case being run.
131
140
*/
132
141
public function runTestCase ($ testCaseFile , PHPUnit_Framework_TestListener $ reporter , $ codeCoverage = false ) {
133
- $ testCaseFileWithPath = $ this ->_getTestsPath ($ reporter ->params ) . DS . $ testCaseFile ;
134
-
135
- if (!file_exists ($ testCaseFileWithPath ) || strpos ($ testCaseFileWithPath , '.. ' )) {
136
- throw new InvalidArgumentException (sprintf (__ ('Unable to load test file %s ' ), htmlentities ($ testCaseFile )));
137
- }
138
-
139
- $ testSuite = $ this ->getTestSuite (sprintf (__ ('Individual test case: %s ' , true ), $ testCaseFile ));
140
- $ testSuite ->addTestFile ($ testCaseFileWithPath );
142
+ $ this ->loadCase ($ testCaseFile );
141
143
return $ this ->run ($ reporter , $ codeCoverage );
142
144
}
143
145
You can’t perform that action at this time.
0 commit comments