rnr1721 / le7-testing
Testing tools for le7 PHP framework
1.0.3
2023-05-20 16:42 UTC
Requires
- php: >=8.1
- nyholm/psr7: ^1.5
- psr/http-message: ^2.0
- psr/simple-cache: ^3.0
- rnr1721/le7-cache: ^1.0
- rnr1721/le7-cookie-wrapper: ^1.0
- rnr1721/le7-logger: ^1.0
- rnr1721/psr7-server: ^1.0
Requires (Dev)
- phpunit/phpunit: ^10.0
- vimeo/psalm: ^5.7
README
L77 PHP MVC framework testing tools
Requirements
- PHP 8.1 or higher.
- Composer 2.0 or higher.
What it can?
it can create mock objects for testing le7 framework.
- ServerRequestInterface
- ResponseInterface
- LoggerInterface
- CacheInterface
- Session
- Cookies
Installation
composer require rnr1721/le7-testing
Testing
composer test
How it works?
use Core\Testing\MegaFactory; $megaFactory = new MegaFactory(); // Get file logger $logger = $megaFactory->getLogger(false,'file.log'); // Get ServerRequestInterface $request = $megaFactory->getServer()->getServerRequest('http://example.com', 'GET'); // etc...