Download the PHP package docler-labs/codeception-slim-module without Composer
On this page you can find all versions of the php package docler-labs/codeception-slim-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download docler-labs/codeception-slim-module
More information about docler-labs/codeception-slim-module
Files in docler-labs/codeception-slim-module
Package codeception-slim-module
Short Description Codeception Module for Slim framework.
License MIT
Informations about the package codeception-slim-module
DoclerLabs - Codeception Slim Module
This module allows you to run functional tests inside Slim 4 Microframework without HTTP calls, so tests will be much faster and debug could be easier.
Inspiration comes from herloct/codeception-slim-module library.
Install
Minimal requirements
- php:
^8.0 - slim/slim:
^4.7 - codeception/codeception:
^5.0
If you don't know Codeception, please check Quickstart Guide first.
If you already have Codeception installed in your Slim application, you can add codeception-slim-module with a single composer command.
For PHP 7 support, please use docler-labs/codeception-slim-module:^2.0 version
If you use Slim v3, please use the previous version from library:
Configuration
Example (test/suite/functional.suite.yml)
The application property is a relative path to file which returns your Slim\App instance.
You can also configure default headers that will be sent with every request using the headers option:
Here is the minimum application.php content:
Testing your API endpoints
With default headers
When you configure default headers in your suite configuration, you no longer need to set them manually in each test:
All versions of codeception-slim-module with dependencies
codeception/codeception Version ^5.0
codeception/lib-innerbrowser Version ^3.0 || ^4.0
slim/psr7 Version ^1.3
slim/slim Version ^4.7