@@ -511,15 +511,15 @@ public function scrollToTopOfPage()
511511 * Takes given $command and executes it against bin/magento or custom exposed entrypoint. Returns command output.
512512 *
513513 * @param string $command
514- * @param string $arguments
515514 * @param integer $timeout
515+ * @param string $arguments
516516 * @return string
517517 *
518518 * @throws TestFrameworkException
519519 */
520- public function magentoCLI ($ command , $ arguments = null , $ timeout = null )
520+ public function magentoCLI ($ command , $ timeout = null , $ arguments = null )
521521 {
522- return $ this ->curlExecMagentoCLI ($ command , $ arguments , $ timeout );
522+ return $ this ->curlExecMagentoCLI ($ command , $ timeout , $ arguments );
523523 //TODO: calling bin/magento from pipeline is timing out, needs investigation (ref: MQE-1774)
524524// try {
525525// return $this->shellExecMagentoCLI($command, $arguments);
@@ -674,18 +674,18 @@ public function fillSecretField($field, $value)
674674 * The data is decrypted immediately prior to data creation to avoid exposure in console or log.
675675 *
676676 * @param string $command
677- * @param null $arguments
678677 * @param null $timeout
678+ * @param null $arguments
679679 * @throws TestFrameworkException
680680 * @return string
681681 */
682- public function magentoCLISecret ($ command , $ arguments = null , $ timeout = null )
682+ public function magentoCLISecret ($ command , $ timeout = null , $ arguments = null )
683683 {
684684 // to protect any secrets from being printed to console the values are executed only at the webdriver level as a
685685 // decrypted value
686686
687687 $ decryptedCommand = CredentialStore::getInstance ()->decryptAllSecretsInString ($ command );
688- return $ this ->magentoCLI ($ decryptedCommand , $ arguments , $ timeout );
688+ return $ this ->magentoCLI ($ decryptedCommand , $ timeout , $ arguments );
689689 }
690690
691691 /**
@@ -845,7 +845,7 @@ public function makeScreenshot($name = null)
845845 * @return string
846846 * @SuppressWarnings(PHPMD.UnusedPrivateMethod)
847847 */
848- private function shellExecMagentoCLI ($ command , $ arguments , $ timeout ): string
848+ private function shellExecMagentoCLI ($ command , $ arguments , $ timeout = 60 ): string
849849 {
850850 $ php = PHP_BINDIR ? PHP_BINDIR . DIRECTORY_SEPARATOR . 'php ' : 'php ' ;
851851 $ binMagento = realpath (MAGENTO_BP . DIRECTORY_SEPARATOR . 'bin ' . DIRECTORY_SEPARATOR . 'magento ' );
@@ -865,13 +865,13 @@ private function shellExecMagentoCLI($command, $arguments, $timeout): string
865865 * Takes given $command and executes it against exposed MTF CLI entry point. Returns response from server.
866866 *
867867 * @param string $command
868- * @param string $arguments
869868 * @param integer $timeout
869+ * @param string $arguments
870870 *
871871 * @return string
872872 * @throws TestFrameworkException
873873 */
874- private function curlExecMagentoCLI ($ command , $ arguments , $ timeout ): string
874+ private function curlExecMagentoCLI ($ command , $ timeout , $ arguments ): string
875875 {
876876 // Remove index.php if it's present in url
877877 $ baseUrl = rtrim (
0 commit comments