Download the PHP package aivec/codecept-docker without Composer

On this page you can find all versions of the php package aivec/codecept-docker. 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 codecept-docker

Codeception for WordPress with Docker

A CLI wrapper for Codeception with wp-browser that containerizes and automates environment creation for WordPress integration testing. Jump to Quickstart Guide

Background (Why?)

Until recently, integration testing in WordPress has basically been a pipe-dream. The barrier to entry for setting up a fully functioning environment just for integration testing is simply too high for most people.

Then came Codeception and wp-browser. Codeception is a PHP testing framework that allows developers to easily write end-to-end integration tests, while wp-browser is a module for Codeception that allows you to write tests in a WordPress context (similar to WordPress core tests). These two tools used in tandem are very powerful, but the original problem remains:

setting up an environment...

Docker to the Rescue

This library automates environment creation and puts everything in Docker containers. THERE ARE NO INTERACTIVE PROMPTS. The whole purpose of integration testing is automation. Integration environment creation should be no different.

The only thing required is a codecept-docker.json config file in the root folder of your project, which at a minimum must specify whether the root folder is a plugin or theme. The CLI then mounts the root folder in the WordPress container as a plugin/theme. This config can also be used to specify which WordPress and PHP versions to install, which plugins/themes to install, etc.

By default, the containers created are prefixed with the name of the root folder where this package is installed. This allows having multiple non-conflicting environments on a per-project basis.

After the environment is created, the WordPress container acts like a proxy to the codecept command. All tests are then invoked from within the WordPress container.

The end result is that the developer doesn't need to know any details about the environment their tests run in. Just start it and GO!

Main Features

Requirements

Installation

Quickstart Guide

Create the Scaffolding

The following commands only need to be run the very first time you install this package. There are 2 steps:

First, create a codecept-docker.json config file:

Second, generate the Codeception folders/files:

Start the Containers

Finally, spin up the containers. If it's your very first time it may take a while:

Run the Tests

All suites, excluding unit tests, must be run from within the container with the aivec-codecept codecept command. Lets run the sample test created for the wpunit suite with the folliwing:

Thats it!

The aivec-codecept codecept command behaves exactly like the normal codecept command, except that it is invoked from within the WordPress container. Use this command in place of the normal codecept command for running tests.


All versions of codecept-docker with dependencies

PHP Build Version
Package Version
Requires vanilla/garden-cli Version ^2.2
vlucas/valitron Version ^1.4
lucatume/wp-browser Version ^3.0
codeception/codeception Version ^4.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 aivec/codecept-docker contains the following files

Loading the files please wait ....