Skip to content

Commit

Permalink
fixing up some tests in the progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
dogmatic69 committed Aug 6, 2012
1 parent 2e5019a commit 81d76f1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Core/Libs/Console/Command/Task/ProgressBarTask.php
Expand Up @@ -17,7 +17,7 @@
* @package progress_bar
* @subpackage progress_bar.vendors.shells.tasks
*/
class ProgressBarTask extends Shell {
class ProgressBarTask extends AppShell {

/**
* Console Width
Expand Down
18 changes: 11 additions & 7 deletions Core/Libs/Test/Case/Console/Command/Tasks/ProgressBarTaskTest.php
Expand Up @@ -51,19 +51,19 @@ class TestProgressBarTask extends ProgressBarTask {
* @return void
* @access public
*/
function niceRemaining() {
public function niceRemaining() {
return $this->_niceRemaining();
}

function messages($clear = true) {
public function messages($clear = true) {
$return = $this->messages;
if ($clear) {
$this->messages = array();
}
return $return;
}

function out($message) {
public function out($message) {
$this->messages[] = $message;
}
}
Expand All @@ -83,10 +83,14 @@ class ProgressBarTaskTest extends CakeTestCase {
* @access public
*/
public function startTest() {
$this->Dispatcher = new ShellDispatcher();
$this->Dispatcher->shellPaths = App::path('shells');
$this->Task = new TestProgressBarTask($this->Dispatcher);
$this->Task->Dispatch = $this->Dispatcher;
$out = $this->getMock('ConsoleOutput', array(), array(), '', false);
$in = $this->getMock('ConsoleInput', array(), array(), '', false);

$this->Task = $this->getMock('TestProgressBarTask',
array('in', 'err', 'createFile', '_stop', '_checkUnitTest'),
array($out, $out, $in)
);
$this->Task->name = 'ProgressBar';
$this->Task->path = TMP . 'tests' . DS;
}

Expand Down

0 comments on commit 81d76f1

Please sign in to comment.