lapaz/codeception-psr15

Generic PSR-15 Functional Test Module for Codeception

0.3.1 2018-09-05 04:24 UTC

This package is auto-updated.

Last update: 2024-04-05 19:36:21 UTC


README

Build Status

Add Psr15 functional test module to your finctional.suite.yml:

# Codeception Test Suite Configuration

class_name: FunctionalTester
modules:
    enabled:
        - \Lapaz\Codeception\Psr15\Module\Psr15:
            requestHandler: tests/_app/handler.php
        - \Helper\Functional
        - Asserts

tests/_app/handler.php example using PSR-11 DI container:

<?php
/** @var \Psr\Container\ContainerInterface $di */
$di = require __DIR__ . '/../../config/container.php';

return $di->get('rootRequestHandler');

Then you can test the middleware as your application below:

$I->amOnPage('/');
$I->see('Expected text');