MiddlewareChainTest
extends PioniaTestCase
in package
Table of Contents
Properties
- $application : PioniaApplication|null
- $request : Request|null
Methods
- applicationMock() : PioniaApplication
- createMockContextUser() : ContextUserObject
- This would be mimicking a user we got from our db
- createMockSettings() : EnvResolver
- requestMock() : Request
- mock a post request
- setUp() : void
- tearDown() : void
- testAddAfter() : void
- Tests that the middleware is added after the specified middleware
- testAddBefore() : void
- Tests that the middleware is added before the specified middleware
- testAddMiddlewareToChain() : mixed
- testExecuteMiddlewareChain() : void
- Tests that the middleware chain is executed
- testIsMiddleware() : mixed
- Tests that a given class string is a valid middleware
- testMiddlewareChainCreation() : mixed
Properties
$application
public
PioniaApplication|null
$application
= null
$request
public
Request|null
$request
Methods
applicationMock()
public
applicationMock() : PioniaApplication
Tags
Return values
PioniaApplicationcreateMockContextUser()
This would be mimicking a user we got from our db
public
createMockContextUser([ContextUserObject|null $customObj = null ]) : ContextUserObject
Parameters
- $customObj : ContextUserObject|null = null
Return values
ContextUserObjectcreateMockSettings()
public
createMockSettings() : EnvResolver
Return values
EnvResolverrequestMock()
mock a post request
public
requestMock([array<string|int, mixed> $data = [] ][, string|null $requestType = 'POST' ][, string|null $url = 'http://localhost:8000/api/v1/' ]) : Request
Parameters
- $data : array<string|int, mixed> = []
- $requestType : string|null = 'POST'
- $url : string|null = 'http://localhost:8000/api/v1/'
Return values
RequestsetUp()
public
setUp() : void
tearDown()
public
tearDown() : void
testAddAfter()
Tests that the middleware is added after the specified middleware
public
testAddAfter() : void
testAddBefore()
Tests that the middleware is added before the specified middleware
public
testAddBefore() : void
Tags
testAddMiddlewareToChain()
public
testAddMiddlewareToChain() : mixed
testExecuteMiddlewareChain()
Tests that the middleware chain is executed
public
testExecuteMiddlewareChain() : void
testIsMiddleware()
Tests that a given class string is a valid middleware
public
testIsMiddleware() : mixed
testMiddlewareChainCreation()
public
testMiddlewareChainCreation() : mixed