2017 © Pedro Peláez
 

library codeception-generic-middleware

Generic Middleware Functional Test Module for Codeception

image

lapaz/codeception-generic-middleware

Generic Middleware Functional Test Module for Codeception

  • Thursday, June 8, 2017
  • by tanakahisateru
  • Repository
  • 2 Watchers
  • 2 Stars
  • 79 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Generic PSR-15 Functional Test Module for Codeception

Build Status, (*1)

Add Psr15 functional test module to your finctional.suite.yml:, (*2)

# 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:, (*3)

<?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:, (*4)

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

The Versions