lapaz/codeception-psr15

Generic PSR-15 Functional Test Module for Codeception

Maintainers

Package info

github.com/LapazPhp/CodeceptionPsr15

pkg:composer/lapaz/codeception-psr15

Statistics

Installs: 32

Dependents: 0

Suggesters: 0

Stars: 3

Open Issues: 1

0.3.1 2018-09-05 04:24 UTC

This package is auto-updated.

Last update: 2026-03-05 23:36:30 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');