Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Setup EcomDev_PHPUnit in a Magento 1.x directory
#!/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
You can’t perform that action at this time.