Download the PHP package 0x6d617474/wp-testing without Composer

On this page you can find all versions of the php package 0x6d617474/wp-testing. 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 wp-testing

WordPress Testing Library

This is a simple testing library to add unit and integration tests to your WordPress packages via PHPUnit and Behat.

Installation

Requirements

The following is required in order to use the test library:

Writing Tests

Make a tests directory in the root of your project, with the following structure:

You can find examples in the tests directory in this project.

You'll also need a behat.yml file and phpunit.xml file in your project root.

You can find examples in the root of this project. Note that only the autoload and suites keys are defined in the behat.yml file. The rest of the values are defined by the library and passed at runtime.

Write your unit tests in the tests/unit directory, and your integration tests in the tests/behat/features/core directory. You can make additional integration test suites by making new folders under tests/behat/features and updating your behat.yml file. A dev suite is included in the example behat.yml file.

Running Tests

To run your unit tests, simply run phpunit if you have it installed locally, or you can run the included vendor/bin/phpunit.

To run your integration tests, run the vendor/bin/wp-behat [suite=core] [browser=phantomjs] command.

Notes

In general, DO NOT run this test suite on a production environment. It does weird things with the database, and while it tries to clean up after itself, things happen. Just don't risk it.

Unit Tests

Unit tests are run using the official WordPress test suite libraries, which are sourced from develop.svn.wordpress.org. The same database your WordPress installation uses is used to run the tests, however with temporary tables prefixed with wptests_. These tables are cleaned up after the test suite finishes. Don't prefix your real tables with wptests_ or they will be deleted as well.

Integration Tests

By default, the library will run the core test suite via PhantomJS. You can pass in arguments to change this behavior (see above). For example, to run the dev test suite via Chrome, you would call vendor/bin/wp-behat dev chrome.

Just before running the tests, a Must Use plugin will be created in your WordPress installation, and the plugin will be removed afterwards. This plugin sets the _WP_TESTING_ENVIRONMENT constant, which you can use in your code to add/remove behavior during the run of the test suite.


All versions of wp-testing with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
behat/behat Version ^3.0
behat/mink Version ^1.7
behat/mink-extension Version ^2.2
behat/mink-goutte-driver Version *
behat/mink-selenium2-driver Version *
phpunit/phpunit Version ^5.7
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 0x6d617474/wp-testing contains the following files

Loading the files please wait ....