Skip to content

Commit

Permalink
Renamed cli() to exec()
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyharris committed Jun 23, 2017
1 parent 8be905e commit ac5e4cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/TestSuite/ConsoleIntegrationTestCase.php
Expand Up @@ -65,7 +65,7 @@ class ConsoleIntegrationTestCase extends TestCase
* @param array $input Input values to pass to an interactive shell
* @return void
*/
public function cli($command, array $input = [])
public function exec($command, array $input = [])
{
$dispatcher = $this->_makeDispatcher("bin/cake $command");

Expand Down
8 changes: 4 additions & 4 deletions tests/TestCase/TestSuite/ConsoleIntegrationTestCaseTest.php
Expand Up @@ -27,7 +27,7 @@ public function setUp()
*/
public function testCli()
{
$this->cli('');
$this->exec('');

$this->assertOutputContains('Welcome to CakePHP');
$this->assertExitCode(Shell::CODE_ERROR);
Expand All @@ -40,7 +40,7 @@ public function testCli()
*/
public function testCliCoreCommand()
{
$this->cli('routes');
$this->exec('routes');

$this->assertOutputContains('Welcome to CakePHP');
$this->assertExitCode(Shell::CODE_SUCCESS);
Expand All @@ -53,7 +53,7 @@ public function testCliCoreCommand()
*/
public function testCliWithInput()
{
$this->cli('sample bridge', ['javascript']);
$this->exec('sample bridge', ['javascript']);

$this->assertErrorContains('No!');
$this->assertExitCode(Shell::CODE_ERROR);
Expand All @@ -66,7 +66,7 @@ public function testCliWithInput()
*/
public function testCliWithMultipleInput()
{
$this->cli('sample bridge', ['cake', 'blue']);
$this->exec('sample bridge', ['cake', 'blue']);

$this->assertOutputContains('You may pass');
$this->assertExitCode(Shell::CODE_SUCCESS);
Expand Down

0 comments on commit ac5e4cd

Please sign in to comment.