CRM_Utils_QueryFormatterTest
extends TestCase
in package
implements
HeadlessInterface, HookInterface
FIXME - Add test description.
Tips:
- With HookInterface, you may implement CiviCRM hooks directly in the test class. Simply create corresponding functions (e.g. "hook_civicrm_post(...)" or similar).
- With TransactionalInterface, any data changes made by setUp() or test****() functions will rollback automatically -- as long as you don't manipulate schema or truncate tables. If this test needs to manipulate schema or truncate tables, then either: a. Do all that using setupHeadless() and Civi\Test. b. Disable TransactionalInterface, and handle all setup/teardown yourself.
Tags
Table of Contents
Interfaces
- HeadlessInterface
- Interface HeadlessInterface
- HookInterface
Methods
- createExampleTable() : mixed
- dataProvider() : array<string|int, mixed>
- Generate data for tests to iterate through.
- setUpHeadless() : CiviEnvBuilder
- Civi\Test has many helpers, like install(), uninstall(), sql(), and sqlFile(). See: https://github.com/civicrm/org.civicrm.testapalooza/blob/master/civi-test.md
- supportsFts() : mixed
- tearDown() : void
- tearDownAfterClass() : void
- testFormat() : mixed
- Test format.
- assertSqlIds() : mixed
Methods
createExampleTable()
public
createExampleTable() : mixed
dataProvider()
Generate data for tests to iterate through.
public
dataProvider() : array<string|int, mixed>
Note: These examples are not locked in stone -- but do exercise discretion in revising them!
Return values
array<string|int, mixed>setUpHeadless()
Civi\Test has many helpers, like install(), uninstall(), sql(), and sqlFile(). See: https://github.com/civicrm/org.civicrm.testapalooza/blob/master/civi-test.md
public
setUpHeadless() : CiviEnvBuilder
Return values
CiviEnvBuildersupportsFts()
public
static supportsFts() : mixed
tearDown()
public
tearDown() : void
tearDownAfterClass()
public
static tearDownAfterClass() : void
testFormat()
Test format.
public
testFormat(string $text, string $language, string $mode, string $expectedText, array<string|int, mixed>|null $expectedRowIds) : mixed
Parameters
- $text : string
- $language : string
- $mode : string
- $expectedText : string
- $expectedRowIds : array<string|int, mixed>|null
Tags
assertSqlIds()
private
assertSqlIds(array<string|int, mixed> $expectedRowIds, string $sql) : mixed
Parameters
- $expectedRowIds : array<string|int, mixed>
- $sql : string