Download the PHP package wpstarter/wp-testbench without Composer
On this page you can find all versions of the php package wpstarter/wp-testbench. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package wp-testbench
About WpTestbench
WpTestbench is a tool used to set up a WordPress test environment for PHPUnit testing, in order to test your plugin.
Installation
Install testbench via composer
composer require wpstarter/wp-testbench --dev
Install WordPress
./vendor/bin/wp-testbench-install <db-name> <db-user> [db-pass] [db-host] [wp-version] [--skip-database-creation]
Update phpunit.xml
<phpunit
...
bootstrap="./vendor/wpstarter/wp-testbench/bootstrap.php"
>
...
<php>
<server name="WP_TESTBENCH_PLUGIN" value="your-plugin.php"/>
...
</php>
</phpunit>
Custom wp-config.php
<phpunit>
<php>
<server name="WP_TESTBENCH_CONFIG" value="your-config.php"/>
</php>
</phpunit>
That's all then you can run the PHPUnit test
./vendor/bin/phpunitAll versions of wp-testbench with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.3|^8.0
ext-mysqli Version *
ext-json Version *
ext-readline Version *
ext-mysqli Version *
ext-json Version *
ext-readline Version *
The package wpstarter/wp-testbench contains the following files
Loading the files please wait ...