\Phile\Plugin\Phile\ErrorHandler\TestsPluginTest

Class for Phile test-cases

Summary

Methods
Properties
Constants
testWhoops()
No public properties found
No constants found
createPhileCore()
createPhileResponse()
createServerRequestFromArray()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

testWhoops()

testWhoops()

Basic test that whoops plugin is running.

The exception is not thrown but caught by Whoops and rendered plaintext CLI response.

createPhileCore()

createPhileCore(\Phile\Core\Event  $event = null,\Phile\Core\Config  $config = null): \Phile\Phile

Creates a Phile-core with bootstrap configuration for testing

Parameters

\Phile\Core\Event $event
\Phile\Core\Config $config

Returns

\Phile\Phile —

configured core

createPhileResponse()

createPhileResponse(\Phile\Phile  $app,\Psr\Http\Message\ServerRequestInterface  $request)

Run Phile and create response

Parameters

\Phile\Phile $app
\Psr\Http\Message\ServerRequestInterface $request

createServerRequestFromArray()

createServerRequestFromArray(array  $server = null): \Psr\Http\Message\ServerRequestInterface

Creates ServerRequest

Parameters

array $server

$_SERVER environment

Returns

\Psr\Http\Message\ServerRequestInterface