Last active
February 8, 2019 15:58
-
-
Save gpaddis/8f15be088d64702555cad8c374833422 to your computer and use it in GitHub Desktop.
Setup EcomDev_PHPUnit in a Magento 1.x directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ $# -ne 2 ]]; then | |
echo "Usage: $0 db_name base_url" | |
exit 1 | |
fi | |
dbName="$1" | |
baseUrl="$2" | |
test -f app/Mage.php || { | |
echo "Unable to find Magento in the current directory." | |
exit 1 | |
} | |
test -d "app/code/community/EcomDev/PHPUnit" || { | |
echo "Ecomdev_PHPUnit is not installed in this shop." | |
exit 1 | |
} | |
cd shell | |
test -f "../app/etc/local.xml.phpunit" || { | |
echo "Creating the configuration files..." | |
php -f ecomdev-phpunit.php -- --action install && php -f ecomdev-phpunit.php -- --action change-status | |
} | |
php ecomdev-phpunit.php -a magento-config --db-name $dbName --base-url $baseUrl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment