Tuesday, January 08, 2019
More coming Soon
phpMyAdmin is pre-installed on the vm, and can be easily accessed via
http://172.22.22.22/phpmyadmin and logging in as zencart/zencart.
For easy importing of .sql files, note that on your host PC there is a
habitat/tmpfolder. This is shared with phpMyAdmin and makes quick importing of .sql files very simple.
- Simply copy any desired .sql files to your host PC's
- Open phpmyadmin in your browser,
select a database, and then click the
Importbutton. There will be a dropdown available with a list of all the .sql files above.
To do a complete backup of all databases in the vm:
mysqldump -u zencart -pzencart --all-databases --hex-blob | gzip -9 > ./habitat_$(date +%Y-%0m-%0dat%0I%0M%0p.sql.gz)
Similarly, to restore:
mysql -u zencart -pzencart < HABITAT_FILENAME
Habitat includes a helper script to help with running unit tests within the Zen Cart testFramework. This depends on having
do_default\_map: set to true in your yaml file. It may encounter some difficulties if the
folders:to settings have been customized.
From the command line you can do
The option given to the unittest script is a reference to a site in your habitat VM. In other words it should match the
dir option given in a
sites: block of your yaml file. To run the tests on the
develop branch, on your host machine you'd use
Habitat also includes a helper script to generate phpDocumentor output, which will be placed in the
Syntax is similar to the unit-testing above, and depends on the same prerequisites.
cd habitat/tools ./generatedocs DIRNAME
Powered by Codex 1.1.0