Download the PHP package wordpoints/module-uninstall-tester without Composer
On this page you can find all versions of the php package wordpoints/module-uninstall-tester. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wordpoints/module-uninstall-tester
More information about wordpoints/module-uninstall-tester
Files in wordpoints/module-uninstall-tester
Package module-uninstall-tester
Short Description Utilities for testing WordPoints module install/uninstall with PHPUnit
License MIT
Homepage https://github.com/WordPoints/wordpoints-module-uninstall-tester
Informations about the package module-uninstall-tester
WordPoints Module Uninstall Tester
A testcase class for testing WordPoints module install and uninstall, with related tools.
Note: this library is now deprecated in favor of the testcase bundled with the WordPoints dev-lib.
Background
This repo is an extension of the WP Plugin Uninstall Tester, which enables it for use with WordPoints modules. For more information about the purpose and use of it, see that repo.
Requirements
The WP Plugin Uninstall Tester is required, and must be included in your bootstrap before you include this extension's files. It will be installed for you automatically if you are using composer.
Compatibility
The library is intended to be compatible with the current stable version of the WordPoints plugin, as well as the bleeding edge development version. It should also be compatible with all versions of PHP and WordPress which those versions of WordPoints support.
Installation
You can install this library with composer:
Set Up
You need to modify your tests' boostrap file to only include the module when the uninstall tests aren't being run.
Secondly, you need to include the bootstrap.php
file:
Thirdly, you need to exclude the uninstall group from the tests in your PHPUnit XML config file:
That will exclude the uninstall tests from running by default. To run them, you'll
need to do phpunit --group=uninstall
.
Finally, you will need to set WORDPOINTS_TESTS_DIR
in your environment. This should
be the full path to the /tests/phpunit/
directory in the WordPoints plugin
development source.
Example:
export WORDPOINTS_TESTS_DIR=/path/to/wordpoints/tests/phpunit/
Usage
The only difference in usage from the plugin uninstall test tools, is that the path
to the main module file is stored in the $module_file
property, instead
of $plugin_file
.
License
This library is joint licensed under the MIT and GPLv2 licenses.