FilterTest
extends TestCase
in package
implements
HeadlessInterface, TransactionalInterface
Class FilterTest
Ensure that the HTML post-processing/filtering works as expected.
Tags
Table of Contents
Interfaces
- HeadlessInterface
- Interface HeadlessInterface
- TransactionalInterface
- Interface HeadlessInterface
Constants
- PERSON_TPL = '<af-form ctrl="modelListCtrl" ><af-entity type="Contact" name="person" />%s</af-form>'
Methods
- setUpHeadless() : mixed
- The setupHeadless function runs at the start of each test case, right before the headless environment reboots.
- testDefnInjection() : void
- testDefnInjectionNested() : void
- testDefnOverrideTitle() : void
- htmlFilter() : string
- Apply any filters to an HTML partial.
Constants
PERSON_TPL
public
mixed
PERSON_TPL
= '<af-form ctrl="modelListCtrl" ><af-entity type="Contact" name="person" />%s</af-form>'
Methods
setUpHeadless()
The setupHeadless function runs at the start of each test case, right before the headless environment reboots.
public
setUpHeadless() : mixed
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.
testDefnInjection()
public
testDefnInjection() : void
testDefnInjectionNested()
public
testDefnInjectionNested() : void
testDefnOverrideTitle()
public
testDefnOverrideTitle() : void
htmlFilter()
Apply any filters to an HTML partial.
private
htmlFilter(string $fileName, string $html) : string
Parameters
- $fileName : string
- $html : string
-
Original HTML.
Return values
string —Modified HTML.