GoogleAnalyticsTest
extends TestCase
in package
Uses
ViewTrait
GoogleAnalytics view helper Test Class
Tags
Table of Contents
- testBasicSetup() : void
- Test the helper (basic setup)
- testCustomCreateOptions() : void
- Test custom create options.
- testDisabled() : void
- Test the helper (disabled mode)
- getPathForTheme() : string
- Get the directory for a given theme.
- getPhpRenderer() : PhpRenderer
- Get a working renderer.
- getSearchMemoryViewHelper() : SearchMemory
- Get mock SearchMemory view helper
- renderGA() : string
- Render the GA code
Methods
testBasicSetup()
Test the helper (basic setup)
public
testBasicSetup() : void
Return values
void —testCustomCreateOptions()
Test custom create options.
public
testCustomCreateOptions() : void
Return values
void —testDisabled()
Test the helper (disabled mode)
public
testDisabled() : void
Return values
void —getPathForTheme()
Get the directory for a given theme.
protected
getPathForTheme(string $theme) : string
Parameters
- $theme : string
-
Theme directory name
Return values
string —getPhpRenderer()
Get a working renderer.
protected
getPhpRenderer([array<string|int, mixed> $plugins = [] ][, string $theme = 'bootstrap3' ]) : PhpRenderer
Parameters
- $plugins : array<string|int, mixed> = []
-
Custom VuFind plug-ins to register
- $theme : string = 'bootstrap3'
-
Theme directory to load from
Return values
PhpRenderer —getSearchMemoryViewHelper()
Get mock SearchMemory view helper
protected
getSearchMemoryViewHelper([Memory|null $memory = null ]) : SearchMemory
Parameters
- $memory : Memory|null = null
-
Optional search memory
Return values
SearchMemory —renderGA()
Render the GA code
protected
renderGA(string $key[, array<string|int, mixed> $options = [] ]) : string
Parameters
- $key : string
-
GA key (false for disabled)
- $options : array<string|int, mixed> = []
-
Options for GA helper