Documentation

UniversalRouteTestClass extends StaticRoutesTestClass
in package
Uses Utils

Tags
psalm-suppress

PropertyNotSetInConstructor

Table of Contents

HELLO_STATIC_WORLD  = 'Hello static world!'
HELLO_STATIC_WORLD_METHOD  = '\Mezon\Router\Tests\StaticRoutesUnitTest::staticHelloWorldOutput'
HELLO_WORLD  = 'Hello world!'
clearMethodTestDataProvider()  : array<string|int, mixed>
Data provider
helloWorldOutput()  : string
Function simply returns string
setUp()  : void
Default setup
staticHelloWorldOutput()  : string
Function simply returns string
subArray()  : string
Method returns some testing string
testArrayRoutes()  : void
Testing array routes
testClearMethod()  : void
Testing 'clear' method
testDeleteRequestForUnExistingStaticRoute()  : void
Testing static routes for DELETE requests.
testEmptyArrayRoutes()  : void
Testing empty array routes
testIndexRoute()  : void
Testing empty array routes
testInvalidRequestMethodException()  : void
Testing invalid request method
testMultipleRequestTypes()  : void
Testing empty array routes
testPostRequestForUnExistingStaticRoute()  : void
Testing static routes for POST requests.
testPutRequestForUnExistingStaticRoute()  : void
Testing static routes for PUT requests.
testRequestForExistingStaticRoute()  : void
Testing static routes calls for all possible request methods
testRouteExists()  : void
Testing routeExists
testUniversalRoute()  : void
Testing one processor for all routes
testUnknownMethodException()  : void
Testing exception throwing if the method was not found
universalRouteDataProvider()  : array<string|int, mixed>
Method returns data sets
getRouter()  : RouterInterface
Method creates router object

Constants

HELLO_STATIC_WORLD_METHOD

public mixed HELLO_STATIC_WORLD_METHOD = '\Mezon\Router\Tests\StaticRoutesUnitTest::staticHelloWorldOutput'

Methods

clearMethodTestDataProvider()

Data provider

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

test data

helloWorldOutput()

Function simply returns string

public helloWorldOutput() : string
Return values
string

staticHelloWorldOutput()

Function simply returns string

public static staticHelloWorldOutput() : string
Return values
string

subArray()

Method returns some testing string

public subArray() : string
Return values
string

testArrayRoutes()

Testing array routes

public testArrayRoutes() : void
Return values
void

testClearMethod()

Testing 'clear' method

public testClearMethod(string $method) : void
Parameters
$method : string

request method

Tags
dataProvider

clearMethodTestDataProvider

Return values
void

testDeleteRequestForUnExistingStaticRoute()

Testing static routes for DELETE requests.

public testDeleteRequestForUnExistingStaticRoute() : void
Return values
void

testEmptyArrayRoutes()

Testing empty array routes

public testEmptyArrayRoutes() : void
Return values
void

testIndexRoute()

Testing empty array routes

public testIndexRoute() : void
Return values
void

testInvalidRequestMethodException()

Testing invalid request method

public testInvalidRequestMethodException() : void
Return values
void

testMultipleRequestTypes()

Testing empty array routes

public testMultipleRequestTypes() : void
Return values
void

testPostRequestForUnExistingStaticRoute()

Testing static routes for POST requests.

public testPostRequestForUnExistingStaticRoute() : void
Return values
void

testPutRequestForUnExistingStaticRoute()

Testing static routes for PUT requests.

public testPutRequestForUnExistingStaticRoute() : void
Return values
void

testRequestForExistingStaticRoute()

Testing static routes calls for all possible request methods

public testRequestForExistingStaticRoute(string $method) : void
Parameters
$method : string
Tags
dataProvider

clearMethodTestDataProvider

Return values
void

testRouteExists()

Testing routeExists

public testRouteExists() : void
Return values
void

testUniversalRoute()

Testing one processor for all routes

public testUniversalRoute(array<string|int, mixed> $routes, string $uri, string $result) : void
Parameters
$routes : array<string|int, mixed>
$uri : string

uri to be requested

$result : string

expected result

Tags
dataProvider

universalRouteDataProvider

Return values
void

testUnknownMethodException()

Testing exception throwing if the method was not found

public testUnknownMethodException() : void
Return values
void

universalRouteDataProvider()

Method returns data sets

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

testing data

Search results

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