MarkdownTestHelper
- Full name:
\MarkdownTestHelper
Methods
getInputOutputPaths
Takes an input directory containing .text and .(x)html files, and returns an array of .text files and the corresponding output xhtml or html file. Can be used in a unit test data provider.
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$directory |
string | Input directory |
assertSameNormalized
Applies PHPUnit's assertSame after normalizing both strings (e.g. ignoring whitespace differences).
public static assertSameNormalized(string $string1, string $string2, string $message, bool $xhtml = true): mixed
Uses logic found originally in MDTest.
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$string1 |
string | |
$string2 |
string | |
$message |
string | Positive message to print when test fails (e.g. "String1 matches String2") |
$xhtml |
bool |
normalizeElementContent
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$element |
\DOMElement | Modifies this element by reference |
$whitespace_preserve |
bool | Preserve Whitespace |
normalizeElementAttributes
- This method is static.
Parameters:
Parameter | Type | Description |
---|---|---|
$element |
\DOMElement | Modifies this element by reference |
Automatically generated on 2025-03-18