DatabaseConnectionTest
extends PioniaTestCase
in package
Table of Contents
Properties
- $application : PioniaApplication|null
- $connection : Connection
- $porm : Db
- $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
- testConnection() : mixed
- testConnectionIsTestMode() : mixed
- setUp() : void
- tearDown() : void
Properties
$application
public
PioniaApplication|null
$application
= null
$connection
public
Connection
$connection
$porm
public
Db
$porm
$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
RequesttestConnection()
public
testConnection() : mixed
testConnectionIsTestMode()
public
testConnectionIsTestMode() : mixed
setUp()
protected
setUp() : void
tearDown()
protected
tearDown() : void