LocaleDetectorFactoryTest
extends TestCase
in package
Uses
ReflectionTrait
LocaleDetectorFactory Test Class
Tags
Table of Contents
- testStrategyListWithBrowserDetection() : void
- Test that we get the full strategy list when browser language detection is on.
- testStrategyListWithNoSettings() : void
- Test that we get the full strategy list by default.
- testStrategyListWithoutBrowserDetection() : void
- Test that we get an abridged strategy list when browser language detection is disabled.
- callMethod() : mixed
- Call protected or private method for side-effect and result.
- getProperty() : mixed
- Return protected or private property.
- getStrategyClasses() : array<string|int, string>
- Call getStrategies on a LocaleDetectorFactory and return a list of classes constructed as a result.
- setProperty() : void
- Set protected or private property.
Methods
testStrategyListWithBrowserDetection()
Test that we get the full strategy list when browser language detection is on.
public
testStrategyListWithBrowserDetection() : void
Return values
void —testStrategyListWithNoSettings()
Test that we get the full strategy list by default.
public
testStrategyListWithNoSettings() : void
Return values
void —testStrategyListWithoutBrowserDetection()
Test that we get an abridged strategy list when browser language detection is disabled.
public
testStrategyListWithoutBrowserDetection() : void
Return values
void —callMethod()
Call protected or private method for side-effect and result.
protected
callMethod(object|string $object, string $method[, array<string|int, mixed> $arguments = [] ]) : mixed
Uses PHP's reflection API in order to modify method accessibility.
Parameters
- $object : object|string
-
Object or class name
- $method : string
-
Method name
- $arguments : array<string|int, mixed> = []
-
Method arguments
Tags
Return values
mixed —getProperty()
Return protected or private property.
protected
getProperty(object|string $object, string $property) : mixed
Uses PHP's reflection API in order to modify property accessibility.
Parameters
- $object : object|string
-
Object or class name
- $property : string
-
Property name
Tags
Return values
mixed —getStrategyClasses()
Call getStrategies on a LocaleDetectorFactory and return a list of classes constructed as a result.
protected
getStrategyClasses() : array<string|int, string>
Parameters passed to this method will be forwarded to getStrategies().
Return values
array<string|int, string> —setProperty()
Set protected or private property.
protected
setProperty(object|string $object, string $property, mixed $value) : void
Uses PHP's reflection API in order to modify property accessibility.
Parameters
- $object : object|string
-
Object or class name
- $property : string
-
Property name
- $value : mixed
-
Property value