Download the PHP package tomkyle/mock-psr without Composer
On this page you can find all versions of the php package tomkyle/mock-psr. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tomkyle/mock-psr
More information about tomkyle/mock-psr
Files in tomkyle/mock-psr
Package mock-psr
Short Description Traits for mocking common PSR components in PhpUnit tests
License MIT
Informations about the package mock-psr
tomkyle · Mock PSR
Mock common PSR components in PhpUnit Tests.
Installation
Usage
Examples
PSR-7 Messages
PSR-11 Container
Pass an optional array with things the Container has; calling has and get methods will behave like expected, including throwing Psr\Container\NotFoundExceptionInterface
.
PSR-15 RequestHandler
Includes MockPsr7MessagesTrait
PSR-17 HTTP Factories
Includes MockPsr7MessagesTrait
PSR-18 HTTP Client
Includes MockPsr7MessagesTrait
PDO and PDOStatements
Development
Run all tests
This packages has predefined test setups for code quality, code readability and unit tests. Check them out at the scripts
section of composer.json.
Unit tests
Default configuration is phpunit.xml.dist. Create a custom phpunit.xml to apply your own settings. Also visit phpunit.readthedocs.io · Packagist
PhpStan
Default configuration is Packagist
PhpCS
Default configuration is Packagist
Apply all CS fixes:
On PHP 8.2, setting environment variable PHP_CS_FIXER_IGNORE_ENV
is needed:
All versions of mock-psr with dependencies
psr/log Version ^1.1|^2.0|^3.0
psr/cache Version ^1.0|^2.0|^3.0
psr/container Version ^1.0|^2.0
psr/http-factory Version ^1.0
psr/http-client Version ^1.0
psr/http-message Version ^1.0|^2.0
psr/http-server-handler Version ^1.0
nyholm/psr7 Version ^1.4
phpunit/phpunit Version ^11.0
phpspec/prophecy Version ^1.15