Lines Matching refs:this

137             $this->className = $className;
138 $this->classPath = $classPath;
140 $this->_handleErrors($classPath . ' is not readable. Cannot create test class.');
144 $this->includeParents = $includeParents;
147 $this->includePrivate = $includePrivate;
161 $this->configFile = $configFile;
163 $this->_handleErrors($configFile . ' is not readable. Cannot create test class.');
180 if (isset($this->configFile)) {
181 require_once $this->configFile;
184 require_once $this->classPath;
187 $classMethods = get_class_methods($this->className);
190 if (!$this->includeParents) {
191 $parentMethods = get_class_methods(get_parent_class($this->className));
199 $this->_createDefinition();
200 $this->_createConstructor();
201 $this->_createSetUpTearDown();
207 if (strcasecmp($this->className, $method) !== 0) {
209 if (!$this->includePrivate && strpos($method, '_') === 0) {
212 $this->_createMethod($method);
219 $this->_finishClass();
238 $this->testClass =
240 " * PHPUnit test case for " . $this->className . "\n" .
250 $this->testClass .= "require_once 'PHPUnit.php';\n";
253 $this->testClass .=
254 "class " . $this->className . "Test extends PHPUnit_TestCase {\n\n" .
255 " var \$" . $this->className . ";\n\n";
273 $this->testClass.=
274 " function " . $this->className . "Test(\$name)\n" .
296 $this->testClass .=
300 if (isset($this->configFile)) {
301 $this->testClass .=
302 " require_once '" . $this->configFile . "';\n";
305 $this->testClass .=
306 " require_once '" . $this->classPath . "';\n" .
307 " \$this->" . $this->className . " =& new " . $this->className . "(PARAM);\n" .
311 $this->testClass .=
314 " unset(\$this->" . $this->className . ");\n" .
332 $this->testClass .=
335 " \$result = \$this->" . $this->className . "->" . $methodName . "(PARAM);\n" .
353 $this->testClass.= "}\n";
375 "\$suite = new PHPUnit_TestSuite('" . $this->className . "Test');\n" .
397 if (!isset($this->testClass)) {
398 $this->_handleErrors('Noting to write.', PHPUS_WARNING);
403 $fp = fopen($destination . $this->className . 'Test.php', 'w');
407 fwrite($fp, $this->testClass);
411 fwrite($fp, $this->_createTest());