Download the PHP package pantheon-systems/wpunit-helpers without Composer

On this page you can find all versions of the php package pantheon-systems/wpunit-helpers. 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 wpunit-helpers

WPUnit Helpers

Lint Test GitHub GitHub release (latest by date) Unofficial Support

Composer plugin providing unified scripts for installing and running automated WP Unit Tests.

What is this?

This is a set of scripts that can be used in a WordPress plugin or theme repository to run automated tests using the WP Unit Test Framework built on top of PHPUnit. The Composer plugin will install these scripts into the dependent project's bin directory, allowing you to add helper scripts to your composer.json.

This package fundamentally differs from the traditional install-wp-tests.sh script that's existed in the WordPress community for many years by removing some of the idiosyncracies of that workflow and replacing them with a WP-CLI-based approach.

Requirements

Before using these scripts, you must have the following installed:

Additionally, if you intend to run the tests in a CI environment, you will need to have some modern MySQL-compatible database server available (MariaDB, MySQL, etc).

What's included?

Installation

Use Composer to install this package as a development dependency:

On installation, the Composer plugin will copy the scripts into the bin directory of the dependent project. You can then add the scripts to your composer.json:

Local Testing

The install-local-tests.sh script is highly configurable to allow for a variety of local environment setups. Any parameter that could be passed into install-wp-tests.sh is set up as an optional flag in install-local-tests.sh. By default, the script with no flags will assume that a new database should be created as root with no password.

Flags

--skip-db

If set and true, this flag will skip the database creation step. This is useful if you are using a local database that is already set up. This replaces the (now deprecated) --no-db flag.

--dbname

This flag will set the name of the database to be created. The default value is wordpress_test.

--dbuser

This flag will set the username of the database user to be created. The default value is root.

--dbpass

This flag will set the password of the database user to be created. The default value is an empty string.

--dbhost

This flag will set the host of the database to be created. The default value is 127.0.0.1.

--wpversion

This flag will set the version of WordPress to be installed. The default value is latest. Using nightly here will use the latest nightly build of WordPress.

--tmpdir

This flag will set the temporary directory to be used for the WordPress installation. The default value is /tmp.


All versions of wpunit-helpers with dependencies

PHP Build Version
Package Version
Requires composer-plugin-api Version ^2.0
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 pantheon-systems/wpunit-helpers contains the following files

Loading the files please wait ....