Code formatting

This commit is contained in:
Kyle Robinson Young 2011-12-14 22:54:03 -08:00
parent 9d6ea57c30
commit 54ed278284

View file

@ -40,7 +40,7 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
*/ */
public function __construct($loader, $params = array()) { public function __construct($loader, $params = array()) {
if ($loader && !class_exists($loader)) { if ($loader && !class_exists($loader)) {
throw new MissingTestLoaderException(array('class' => $loader)); throw new MissingTestLoaderException(array('class' => $loader));
} }
$this->arguments['loader'] = $loader; $this->arguments['loader'] = $loader;
$this->arguments['test'] = $params['case']; $this->arguments['test'] = $params['case'];
@ -67,15 +67,15 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
$suite = $this->arguments['test']; $suite = $this->arguments['test'];
} else { } else {
$suite = $runner->getTest( $suite = $runner->getTest(
$this->arguments['test'], $this->arguments['test'],
$this->arguments['testFile'] $this->arguments['testFile']
); );
} }
if (count($suite) == 0) { if (count($suite) == 0) {
$skeleton = new PHPUnit_Util_Skeleton_Test( $skeleton = new PHPUnit_Util_Skeleton_Test(
$suite->getName(), $suite->getName(),
$this->arguments['testFile'] $this->arguments['testFile']
); );
$result = $skeleton->generate(true); $result = $skeleton->generate(true);
@ -83,7 +83,7 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
if (!$result['incomplete']) { if (!$result['incomplete']) {
eval(str_replace(array('<?php', '?>'), '', $result['code'])); eval(str_replace(array('<?php', '?>'), '', $result['code']));
$suite = new PHPUnit_Framework_TestSuite( $suite = new PHPUnit_Framework_TestSuite(
$this->arguments['test'] . 'Test' $this->arguments['test'] . 'Test'
); );
} }
} }
@ -108,9 +108,7 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command {
try { try {
$result = $runner->doRun($suite, $this->arguments); $result = $runner->doRun($suite, $this->arguments);
} } catch (PHPUnit_Framework_Exception $e) {
catch (PHPUnit_Framework_Exception $e) {
print $e->getMessage() . "\n"; print $e->getMessage() . "\n";
} }