WordBench京都 2016/03用デモプロジェクト
vagrant box add miya0001/vccw
wget https://github.com/vccw-team/vccw/archive/2.19.0.zip
unzip tunzip 2.19.0.zip
cd vccw-2.19.0
vagrant up
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
mysql -uroot -p*** mysql
create database wordpress;
CREATE USER wordpress IDENTIFIED BY 'wordpress';
CREATE USER wordpress@localhost IDENTIFIED BY 'wordpress';
GRANT ALL PRIVILEGES ON *.* TO wordpress@localhost;
GRANT ALL PRIVILEGES ON *.* TO wordpress;
cd ***/www/wordpress/wp-content/plugins
wp scaffold plugin cc-plugin
wget http://goo.gl/qTy1IB
java -jar selenium-server-standalone-*.jar
cd ***/www/wordpress/wp-content/plugins/cc-plugin
wget http://codeception.com/codecept.phar
php codecept.phar bootstrap
cd tests
cp bootstrap.php _bootstrap.php
cd ***/www/wordpress/wp-content/plugins/cc-plugin
./bin/install-wp-tests.sh wordpress_test wordpress wordpress localhost
or
./bin/install-wp-tests.sh wordpress_test wordpress wordpress vccw.dev
cd ***/www/wordpress/wp-content/plugins/cc-plugin
php codecept.phar generate:test unit AkiyoshiShopManager
class_name: AcceptanceTester
modules:
enabled:
- PhpBrowser:
url: http://vccw.dev
- \Helper\Acceptance
env:
firefox:
modules:
enabled:
- WebDriver:
url: http://vccw.dev
browser: firefox
- \Helper\Acceptance
php codecept.phar generate:cest acceptance CcPlugin
php codecept.phar run unit
php codecept.phar run acceptance
php codecept.phar run acceptance --env firefox