CRM_Oembed_Page_OembedDiscoveryTest
extends TestCase
in package
implements
HeadlessInterface, HookInterface, TransactionalInterface
uses
EntityTrait
Tags
Table of Contents
Interfaces
- HeadlessInterface
- Interface HeadlessInterface
- HookInterface
- TransactionalInterface
- Interface HeadlessInterface
Properties
- $client : LocalHttpClient|null
- $exampleRecord : array<string|int, mixed>|null
- $ids : array<string|int, mixed>
- Array of IDs created to support the test.
- $tablesToCleanUp : array<string|int, mixed>
- Track tables we have modified during a test.
- $testRecords : array<string|int, mixed>
- Records created which will be deleted during tearDown
Methods
- setUp() : void
- setUpHeadless() : CiviEnvBuilder
- The setupHeadless function runs at the start of each test case, right before the headless environment reboots.
- testShare_1024() : mixed
- testShare_default() : mixed
- testStandard() : mixed
- createTestEntity() : array<string|int, mixed>
- Create an entity, recording it's details for tearDown.
- getExampleUrl() : Url
- getShareUrl() : Url
- setTestEntity() : void
- Set the test entity on the class for access.
- setTestEntityID() : void
Properties
$client
protected
LocalHttpClient|null
$client
$exampleRecord
protected
array<string|int, mixed>|null
$exampleRecord
$ids
Array of IDs created to support the test.
protected
array<string|int, mixed>
$ids
= []
e.g $this->ids = ['Event' => ['descriptive_key' => $eventID], 'Group' => [$groupID]];
$tablesToCleanUp
Track tables we have modified during a test.
protected
array<string|int, mixed>
$tablesToCleanUp
= []
Set up functions that add entities can register the relevant tables here for the cleanup process.
$testRecords
Records created which will be deleted during tearDown
protected
array<string|int, mixed>
$testRecords
= []
Methods
setUp()
public
setUp() : void
setUpHeadless()
The setupHeadless function runs at the start of each test case, right before the headless environment reboots.
public
setUpHeadless() : CiviEnvBuilder
It should perform any necessary steps required for putting the database in a consistent baseline -- such as loading schema and extensions.
The utility \Civi\Test::headless()
provides a number of helper functions
for managing this setup, and it includes optimizations to avoid redundant
setup work.
Return values
CiviEnvBuildertestShare_1024()
public
testShare_1024() : mixed
testShare_default()
public
testShare_default() : mixed
testStandard()
public
testStandard() : mixed
createTestEntity()
Create an entity, recording it's details for tearDown.
protected
createTestEntity(string $entity, array<string|int, mixed> $values[, string $identifier = 'default' ]) : array<string|int, mixed>
Parameters
- $entity : string
- $values : array<string|int, mixed>
- $identifier : string = 'default'
Return values
array<string|int, mixed>getExampleUrl()
protected
getExampleUrl() : Url
Return values
UrlgetShareUrl()
protected
getShareUrl([array<string|int, mixed> $shareOpts = [] ]) : Url
Parameters
- $shareOpts : array<string|int, mixed> = []
Return values
UrlsetTestEntity()
Set the test entity on the class for access.
protected
setTestEntity(string $entity, array<string|int, mixed> $values, string $identifier) : void
This follows the ids patter and also the api4TestTrait pattern.
Parameters
- $entity : string
- $values : array<string|int, mixed>
- $identifier : string
setTestEntityID()
protected
setTestEntityID(string $entity, int $id, string $identifier) : void
Parameters
- $entity : string
- $id : int
- $identifier : string