Skip to content
Yukihiko Shinoda edited this page Apr 24, 2020 · 2 revisions

Welcome to the docker-compose-phpunit-wordpress-plugin wiki!

Quickstart

1. Clone or download

git clone https://github.com/yukihiko-shinoda/docker-compose-phpunit-wordpress-plugin.git

2. Set environment variables

Copy .env.dist to .env.

copy .env.dist .env

Edit .env to set PATH_TO_INDIVIDUAL_PLUGIN_DIRECTORY.

Ex:

PATH_TO_INDIVIDUAL_PLUGIN_DIRECTORY=../plugins/staticpress2019
# DOCKER_IMAGE_PHPUNIT=futureys/phpunit-wordpress-plugin:4.3.22-php7.1.33-apache-buster
# MYSQL_VERSION=5.6

3. Open Visual Studio Code in root directory

4. Click [Repoen in Container] button

5. Click [Open Workspace] button

6. Open terminal

And then, you can execute PHPUnit and PHP_CodeSniffer.

phpunit
phpcs

Quick reference

cf. Developing inside a Container using Visual Studio Code Remote Development

Clone this wiki locally