Delivery setup

This commit is contained in:
Almira Krdzic
2018-08-06 17:36:57 +02:00
parent ed0e44b964
commit 5afdde434b
27 changed files with 2809 additions and 236 deletions

View File

@@ -8,6 +8,7 @@ Wiaas implementation based on wordpress [woocommerce](https://woocommerce.com/)
- MySQL server (5.7)
- [Composer](http://getcomposer.org)
- [WP CLI](https://wp-cli.org/#installing)
- [PHPUnit](https://phpunit.de/getting-started/phpunit-6.html) for Unit testing
- NodeJS (for building & developing frontend)
## Local Docker setup
@@ -224,4 +225,21 @@ If your feature requires some database updates that can be easiliy executed from
2) Add this function to `wiaas/includes/class-wiaas-db-update.php` with its timestamp.
This way after `composer update-db` is executed your database update will be applied.
#### Unit testing
1) Install [PHPUnit](https://phpunit.de/getting-started/phpunit-6.html)
wget -O phpunit https://phar.phpunit.de/phpunit-6.phar
cp phpunit /usr/local/bin/phpunit
sudo chmod +x /usr/local/bin/phpunit
2) Setup wiaas plugin unit testing
cd backend/app/plugins/wiaas
./test/bin/setup.sh [db-root] [db-root-pass]
Script will install test environment in `/tmp/wiaas-backend-test`
3) Now you can run `phpunit` inside `wiaas` directory