PioniaTestCase
extends TestCase
in package
Uses
HelperMocksTrait
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
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()
protected
setUp() : void
Tags
tearDown()
protected
tearDown() : void