ContentTest
extends TestCase
in package
Content View Helper Test Class
Tags
Table of Contents
- testBehaviorWithoutTrailingSlash() : void
- Test that the helper works when the $pathPrefix parameter has no trailing slash.
- testBehaviorWithTrailingSlash() : void
- Test that the helper works when the $pathPrefix parameter has a trailing slash.
- performTest() : void
- Perform a test of the helper.
Methods
testBehaviorWithoutTrailingSlash()
Test that the helper works when the $pathPrefix parameter has no trailing slash.
public
testBehaviorWithoutTrailingSlash() : void
Return values
void —testBehaviorWithTrailingSlash()
Test that the helper works when the $pathPrefix parameter has a trailing slash.
public
testBehaviorWithTrailingSlash() : void
Return values
void —performTest()
Perform a test of the helper.
protected
performTest([string $pageName = 'foo' ][, string $pathPrefix = 'content' ][, string $expectedPathPrefix = 'templates/content/' ][, array<string|int, mixed> $context = ['bar' => 'baz'] ][, string $pattern = null ]) : void
Parameters
- $pageName : string = 'foo'
-
Name of the page
- $pathPrefix : string = 'content'
-
Path where the template should be located
- $expectedPathPrefix : string = 'templates/content/'
-
Formatted version of $pathPrefix
- $context : array<string|int, mixed> = ['bar' => 'baz']
-
Optional array of context variables
- $pattern : string = null
-
Optional file system pattern to search page