Download the PHP package trinet/mezzio-test without Composer

On this page you can find all versions of the php package trinet/mezzio-test. 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 mezzio-test

Check Build

mezzio-test

mezzio-test provides classes and tools to help testing mezzio applications. Its API aims to be similar to laminas-test to ease migration from Laminas MVC to Mezzio.

The package is not bound to any testing framework as it does not do any assertions. Instead it just bootstraps the Container and Application based on your config file. Config file locations default to the mezzio-skeleton, but can be reconfigured.

Also, a TestConfigProvider is provided for loading custom testing configuration (custom database, custom container configuration, ...).

Usage

Instantiate the \Trinet\MezzioTest\MezzioTestEnvironment class in your test setup:

This will build your application container, bootstrap the mezzio Application (pipeline, routes) and registers a custom \Laminas\Stratigility\Middleware\ErrorHandler listener, which will just re-throw any exception. Thus, the native exception assertions can be used (eg. $this->expectException() in PHPUnit).

Currently, the Test environment offers three possibilities to dispatch a request:

If your base directory is not at the default location, a constructor parameter can be given to MezzioTestEnvironment.

The container and router can also be retrieved with MezzioTestEnvironment->container() and ->router(), respectively.

Configuration

The \Trinet\MezzioTest\TestConfigProvider can be used to load additional config files used for testing. It will look for *testing.php, *testing.local.php, testing/*testing.php and testing/*testing.local.php in the config directory, which defaults to config/autoload/ in your project root, but can be configured to anything else.

To use it, call the loader when in testing mode in your config/config.php file to get an array of providers:

or to use another config path:


All versions of mezzio-test with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
fig/http-message-util Version ^1.1
laminas/laminas-config-aggregator Version ^1.2
laminas/laminas-diactoros Version ^2.2 || ^3.5
laminas/laminas-stratigility Version ^3.2
mezzio/mezzio Version ^3.2
mezzio/mezzio-router Version ^3.1
psr/container Version ^1.0 || ^2.0
psr/http-message Version ^1.0 || ^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 trinet/mezzio-test contains the following files

Loading the files please wait ....