RouterTest
extends TestCase
in package
Cover Router Test Class
Tags
Table of Contents
- $testTheme : string
- Theme to use for testing purposes.
- testDynamicUrl() : void
- Test a record driver with dynamic thumbnail data.
- testStaticUrl() : void
- Test a record driver with static thumbnail data.
- testUnsupportedThumbnail() : void
- Test a record driver with no thumbnail data.
- getCoverLoader() : Loader|MockObject
- Get a loader object to test.
- getDriver() : TestHarness
- Get a fake record driver
- getRouter() : Router
- Get a router to test
- getThemeDir() : string
- Get the theme directory.
Properties
$testTheme
Theme to use for testing purposes.
protected
string
$testTheme
= 'bootstrap3'
Methods
testDynamicUrl()
Test a record driver with dynamic thumbnail data.
public
testDynamicUrl() : void
Return values
void —testStaticUrl()
Test a record driver with static thumbnail data.
public
testStaticUrl() : void
Return values
void —testUnsupportedThumbnail()
Test a record driver with no thumbnail data.
public
testUnsupportedThumbnail() : void
Return values
void —getCoverLoader()
Get a loader object to test.
protected
getCoverLoader([array<string|int, mixed> $config = [] ][, PluginManager $manager = null ][, ThemeInfo $theme = null ][, HttpService $httpService = null ][, array<string|int, mixed>|bool $mock = false ]) : Loader|MockObject
Parameters
- $config : array<string|int, mixed> = []
-
Configuration
- $manager : PluginManager = null
-
Plugin manager (null to create mock)
- $theme : ThemeInfo = null
-
Theme info object (null to create default)
- $httpService : HttpService = null
-
HTTP client factory
- $mock : array<string|int, mixed>|bool = false
-
Array of functions to mock, or false for real object
Return values
Loader|MockObject —getDriver()
Get a fake record driver
protected
getDriver(array<string|int, mixed> $data) : TestHarness
Parameters
- $data : array<string|int, mixed>
-
Test data
Return values
TestHarness —getRouter()
Get a router to test
protected
getRouter() : Router
Return values
Router —getThemeDir()
Get the theme directory.
protected
getThemeDir() : string