Download the PHP package alleyinteractive/pest-plugin-wordpress without Composer

On this page you can find all versions of the php package alleyinteractive/pest-plugin-wordpress. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pest-plugin-wordpress

WordPress Pest Plugin

Supports integrating Pest with your WordPress code base through the Mantle Framework. Read about the Mantle Testing Framework here.

If you want to start testing your application with Pest, visit the main Pest Repository.

Pest was created by Nuno Maduro under the Sponsorware license. It got open-sourced and is now licensed under the MIT license.

Overview

The WordPress Pest Plugin allows WordPress to be tested using the Pest testing framework. Tests can be written in a very simple manner to 'bring the joy of testing to PHP'.

Example Test

Getting Started

The WordPress Pest Plugin does not require the Mantle Framework to be used on your site (though having the framework greatly enhances your ability to use Pest).

Install the WordPress plugin via the Composer package manager:

Setting up Pest

Note: if you are using the Mantle Framework, skip ahead to Using With the Mantle Framework.

Let's get started integrating your project with Mantle and Pest. This guide assumes that your project is placed inside an existing WordPress installation as a plugin or a theme. Read more information about setting up the test framework here.

The default configuration will install WordPress using a localhost database named wordpress_unit_tests with the username/password pair of root/root. All constants can be overridden using the wp-tests-config.php file or your unit test's bootstrap file.

Assuming you do not have Pest setup in your project, create a tests folder and run the pest --init command:

Replacing the Pest Test Case

Open up the tests/Pest.php file in your project the above command created for you. Look for a line that looks like this:

Replace that with the following:

Mantle also uses composer-wordpress-autoloader so you will need to load vendor/wordpress-autoload.php instead of just vendor/autoload.php.

Finally, you can run Pest directly from the command line:

You can now use the Mantle Testing Framework with Pest to test your WordPress plugin with ease and simplicity. Your IDE will be able to type-hint you as well to allow you to use the testing framework.

Using with the Mantle Framework

Requiring the WordPress Pest Plugin on an existing Mantle project will allow you to install Pest with a few commands.

Install the WordPress plugin via the Composer package manager and run the mantle pest:install WP-CLI command:

That's it! Pest is installed successfully on your Mantle project. You can run your pest tests through Pest now:

Mantle can also generate a Pest-friendly test by running the pest:test WP-CLI command:

Writing Tests

More information can be found on the Testing Framework page.


All versions of pest-plugin-wordpress with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
mantle-framework/testkit Version ^1.0
pestphp/pest-plugin Version ^2.0.1
pestphp/pest Version ^2.5
symfony/var-dumper Version ^6.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package alleyinteractive/pest-plugin-wordpress contains the following files

Loading the files please wait ....