Browse Source

Renamed cli() to exec()

Jeremy Harris 8 years ago
parent
commit
ac5e4cdb7f

+ 1 - 1
src/TestSuite/ConsoleIntegrationTestCase.php

@@ -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");
 

+ 4 - 4
tests/TestCase/TestSuite/ConsoleIntegrationTestCaseTest.php

@@ -27,7 +27,7 @@ class ConsoleIntegrationTestCaseTest extends ConsoleIntegrationTestCase
      */
     public function testCli()
     {
-        $this->cli('');
+        $this->exec('');
 
         $this->assertOutputContains('Welcome to CakePHP');
         $this->assertExitCode(Shell::CODE_ERROR);
@@ -40,7 +40,7 @@ class ConsoleIntegrationTestCaseTest extends ConsoleIntegrationTestCase
      */
     public function testCliCoreCommand()
     {
-        $this->cli('routes');
+        $this->exec('routes');
 
         $this->assertOutputContains('Welcome to CakePHP');
         $this->assertExitCode(Shell::CODE_SUCCESS);
@@ -53,7 +53,7 @@ class ConsoleIntegrationTestCaseTest extends ConsoleIntegrationTestCase
      */
     public function testCliWithInput()
     {
-        $this->cli('sample bridge', ['javascript']);
+        $this->exec('sample bridge', ['javascript']);
 
         $this->assertErrorContains('No!');
         $this->assertExitCode(Shell::CODE_ERROR);
@@ -66,7 +66,7 @@ class ConsoleIntegrationTestCaseTest extends ConsoleIntegrationTestCase
      */
     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);