mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Adding omitted test.
This commit is contained in:
parent
5eb8c8fbcf
commit
01a20f61f1
1 changed files with 14 additions and 0 deletions
|
@ -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.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue