Adding omitted test.

This commit is contained in:
mark_story 2010-10-17 23:40:15 -04:00
parent 5eb8c8fbcf
commit 01a20f61f1

View file

@ -644,6 +644,20 @@ class ShellTest extends CakeTestCase {
$this->assertTrue($result);
}
/**
* test run command calling a legit method.
*
* @return void
*/
function testRunCommandWithMethod() {
$methods = get_class_methods('Shell');
$Mock = $this->getMock('Shell', array('hit_me', 'startup'), array(), '', false);
$Mock->expects($this->once())->method('hit_me')->will($this->returnValue(true));
$result = $Mock->runCommand('hit_me', array());
$this->assertTrue($result);
}
/**
* test run command causing exception on Shell method.
*