Documentation

AddRouteUnitTest extends RouterUnitTestClass
in package

Tags
psalm-suppress

PropertyNotSetInConstructor

Table of Contents

differentHandlersDataProvider()  : array<string|int, mixed>
Data provider for the test
helloWorldOutput()  : string
Function simply returns string.
setRequestMethod()  : void
Function sets $_SERVER['REQUEST_METHOD']
setUp()  : void
Default setup
testAddGetRoute()  : void
Testing addGetMethod method
testAddPostRoute()  : void
Testing addPostMethod method
testDifferentHandlers()  : void
Testing router with different handlers
testRequestMethodsConcurrency()  : void
Testing case when all processors exist
testSetErrorHandler()  : void
Test validate custom error handlers.
errorHandler()  : void
Method increments assertion count
getRouter()  : RouterInterface
Method creates router object

Methods

differentHandlersDataProvider()

Data provider for the test

public differentHandlersDataProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>

helloWorldOutput()

Function simply returns string.

public helloWorldOutput() : string
Return values
string

setRequestMethod()

Function sets $_SERVER['REQUEST_METHOD']

public static setRequestMethod(string $requestMethod) : void
Parameters
$requestMethod : string

request method

Return values
void

setUp()

Default setup

public setUp() : void
Tags
see
TestCase::setUp()
Return values
void

testAddGetRoute()

Testing addGetMethod method

public testAddGetRoute() : void
Return values
void

testAddPostRoute()

Testing addPostMethod method

public testAddPostRoute() : void
Return values
void

testDifferentHandlers()

Testing router with different handlers

public testDifferentHandlers(string $url, callable $handler, string $expectedResult) : void
Parameters
$url : string

url

$handler : callable

handler

$expectedResult : string

expected result

Tags
dataProvider

differentHandlersDataProvider

Return values
void

testRequestMethodsConcurrency()

Testing case when all processors exist

public testRequestMethodsConcurrency() : void
Return values
void

testSetErrorHandler()

Test validate custom error handlers.

public testSetErrorHandler() : void
Return values
void

errorHandler()

Method increments assertion count

protected errorHandler() : void
Return values
void

Search results

    Яндекс.Метрика