MarkdownFactoryTest
extends TestCase
in package
Uses
ConfigPluginManagerTrait
MarkdownFactory Test Class
Tags
Table of Contents
- testConfig() : void
- Test to ensure the markdown factory is using right config for markdown service
- testExtensions() : void
- Test that extensions are added based on configuration
- getMarkdownConverter() : ConverterInterface
- Create markdown converter
- getMarkdownEnvironmentConfig() : ReadOnlyConfiguration
- Return config of created markdown service environment
- getMarkdownEnvironmentExtensions() : array<string|int, mixed>
- Return config of created markdown service environment
- getMockConfigPluginManager() : MockObject|PluginManager
- Get a mock configuration plugin manager with the given configuration "files" available.
- getMockFailingConfigPluginManager() : MockObject|PluginManager
- Get a mock configuration plugin manager that will throw an exception.
Methods
testConfig()
Test to ensure the markdown factory is using right config for markdown service
public
testConfig() : void
Return values
void —testExtensions()
Test that extensions are added based on configuration
public
testExtensions() : void
Return values
void —getMarkdownConverter()
Create markdown converter
protected
getMarkdownConverter(array<string|int, mixed> $config) : ConverterInterface
Parameters
- $config : array<string|int, mixed>
-
Configuration
Tags
Return values
ConverterInterface —getMarkdownEnvironmentConfig()
Return config of created markdown service environment
protected
getMarkdownEnvironmentConfig(array<string|int, mixed> $config) : ReadOnlyConfiguration
Parameters
- $config : array<string|int, mixed>
-
Configuration settings
Return values
ReadOnlyConfiguration —getMarkdownEnvironmentExtensions()
Return config of created markdown service environment
protected
getMarkdownEnvironmentExtensions(array<string|int, mixed> $config) : array<string|int, mixed>
Parameters
- $config : array<string|int, mixed>
-
Configuration settings
Return values
array<string|int, mixed> —getMockConfigPluginManager()
Get a mock configuration plugin manager with the given configuration "files" available.
protected
getMockConfigPluginManager(array<string|int, mixed> $configs[, array<string|int, mixed> $default = [] ][, InvocationOrder|null $getExpect = null ][, InvocationOrder|null $hasExpect = null ]) : MockObject|PluginManager
Parameters
- $configs : array<string|int, mixed>
-
An associative array of configurations where key is the file (e.g. 'config') and value an array of configuration sections and directives
- $default : array<string|int, mixed> = []
-
Default configuration to return when no entry is found in $configs
- $getExpect : InvocationOrder|null = null
-
The expected invocation order for the get() method (null for any)
- $hasExpect : InvocationOrder|null = null
-
The expected invocation order for the has() method (null for any)
Return values
MockObject|PluginManager —getMockFailingConfigPluginManager()
Get a mock configuration plugin manager that will throw an exception.
protected
getMockFailingConfigPluginManager(Throwable $exception) : MockObject|PluginManager
Parameters
- $exception : Throwable
-
Exception to throw