Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getDefaultFallback example
/** * @dataProvider provideGetFallbackTests */
public
function
testGetFallback
(
$expected
,
$locale
)
{
$this
->
assertSame
(
$expected
, Locale::
getFallback
(
$locale
)
)
;
}
public
function
testNoDefaultFallback
(
)
{
$prev
= Locale::
getDefaultFallback
(
)
;
Locale::
setDefaultFallback
(
null
)
;
$this
->
assertSame
(
'nl', Locale::
getFallback
(
'nl_NL'
)
)
;
$this
->
assertNull
(
Locale::
getFallback
(
'nl'
)
)
;
$this
->
assertNull
(
Locale::
getFallback
(
'root'
)
)
;
Locale::
setDefaultFallback
(
$prev
)
;
}
public
function
testDefaultRootFallback
(
)
{