Download the PHP package selective/test-traits without Composer
On this page you can find all versions of the php package selective/test-traits. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package test-traits
selective/test-traits
A collection of PHPUnit test traits.
Requirements
- PHP 8.1+
Installation
Traits
MailerTestTrait
Requirements: composer require symfony/mailer
DI container setup example:
Usage:
PHPUnit test case:
HttpTestTrait
Requirements
- Any PSR-7 and PSR-17 factory implementation.
Provided methods
createRequest(string $method, $uri, array $serverParams = []): ServerRequestInterface
createFormRequest(string $method, $uri, array $data = null): ServerRequestInterface
createResponse(int $code = 200, string $reasonPhrase = ''): ResponseInterface
Usage
Creating a request with query string parameters:
RouteTestTrait
A Slim 4 framework router test trait.
Requirements
- A Slim 4 framework application
Provided methods:
urlFor(string $routeName, array $data = [], array $queryParams = []): string
Usage:
Creating a request with a named route and query string parameters:
License
The MIT License (MIT). Please see License File for more information.
All versions of test-traits with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.0
The package selective/test-traits contains the following files
Loading the files please wait ....