Last active
August 29, 2015 14:11
-
-
Save miya0001/fdc361b5de4e56ad8109 to your computer and use it in GitHub Desktop.
wp-tests-install
This file contains hidden or 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
#!/usr/bin/env bash | |
set -ex; | |
echo 'DROP DATABASE IF EXISTS wordpress_test;' | mysql -u root | |
rm -fr /tmp/wordpress | |
rm -fr /tmp/wordpress-tests-lib | |
bash $(wp --info --format=json | jq -r '.wp_cli_dir_path')/templates/install-wp-tests.sh wordpress_test root '' localhost latest; |
phpunitが入ってなければ、以下のコマンドでインストールできます。
$ brew install phpunit
後は、https://firegoby.jp/archives/5498#phpunit を行えばテストが走ります。vagrant sshしないでテストが走ります!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PHPUnit用のWordPressインストーラー
以下のコマンドで必要なパッケージをインストールしておくこと。
また、MySQLを起動しておくには以下のコマンドで。
準備ができたらローカルにダウンロードするか以下のコマンドを実行すれば、あとは
phpunit
だけでおっけー。