Sign inSign up

jankoch/wordpress

By jankoch

•Updated about 4 years ago

WP with WP-Cli and PHP ZipArchive, Subversion, PHPUnit, PHPCBF and PHPCS.

Image
2

2.3K

jankoch/wordpress repository overview

Latest WordPress with:

  • WP Cli
  • Composer
  • PHPUnit
  • PHP_Codesniffer
  • PHP Code Beautifier
  • Subversion

⁠Version 2.4

  • Added composer

⁠Version 2.3

  • Added PHPUnit 6.5.13.

⁠Version 2.2

  • Added Subversion client.

⁠Version 2.1

  • Added PHP_Sniffer (phpcs)
  • Added PHP Code Beautifier (phpcbf)

⁠How to include PHPUnit to your plugin

While this image integrates PHPUnit, it does not configure unit testing for your plugin automatically. But no worries, it's quite straightforward.

First, connect to an interactive shell in your container and add PHPUnit testing with WP Cli, where "your-plugin-name" is the folder name of the plugin you want to add the tests to:

docker exec -it <container_name> /bin/bash
wp scaffold plugin-tests your-plugin-name

Then cd into the plugin's folder and run the installation script provided

cd wp-content/plugins/your-plugin-name
bin/install-wp-tests.sh wordpress_test username 'password' localhost:3306 latest

Replace the values accordingly, with "localhost" being the name of your database container specified in the docker configuration (e.g. docker-compose.yml).

You can verify that unit testing is installed properly by running

phpunit tests/test-sample.php

from your plugin folder.

Tag summary

Content type

Image

Digest

Size

169 MB

Last updated

almost 8 years ago

docker pull jankoch/wordpress