From 26c67f0bcdba63af74a3ba5b6dcc48afbbbaf03b Mon Sep 17 00:00:00 2001 From: tuanphpvn Date: Tue, 17 Nov 2015 23:46:47 +0700 Subject: [PATCH 1/2] Fix error when run outside shell directory --- shell/ecomdev-phpunit.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/ecomdev-phpunit.php b/shell/ecomdev-phpunit.php index 94f0b9d8..60d03258 100644 --- a/shell/ecomdev-phpunit.php +++ b/shell/ecomdev-phpunit.php @@ -17,7 +17,7 @@ */ -require_once 'abstract.php'; +require_once realpath(dirname($_SERVER["SCRIPT_FILENAME"])) . DIRECTORY_SEPARATOR . 'abstract.php'; // Only this workaround fixes Magento core issue in 1.8 :( $abstractShell = new ReflectionClass('Mage_Shell_Abstract'); From a2274ce44d31fa238f12456d5df192ee5930a69f Mon Sep 17 00:00:00 2001 From: tuanphpvn Date: Wed, 18 Nov 2015 00:17:58 +0700 Subject: [PATCH 2/2] Fix show nothing when syntax error: For Example: php shell/ecomdev-phpunit.php -- -a magento-config -db-name magento_rs_test --base-url http://magento.rs.app/ --- shell/ecomdev-phpunit.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shell/ecomdev-phpunit.php b/shell/ecomdev-phpunit.php index 60d03258..dcc62378 100644 --- a/shell/ecomdev-phpunit.php +++ b/shell/ecomdev-phpunit.php @@ -177,6 +177,8 @@ public function run() echo "EcomDev_PHPUnit module version is {$version} \n"; break; default: + /* Force show help */ + $this->_args['h'] = true; $this->_showHelp(); break; }