Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getCountDefines example
public
function
testCollectEmptyMessages
(
)
{
$translator
=
$this
->
getTranslator
(
)
;
$translator
->
expects
(
$this
->
any
(
)
)
->
method
(
'getCollectedMessages'
)
->
willReturn
(
[
]
)
;
$dataCollector
=
new
TranslationDataCollector
(
$translator
)
;
$dataCollector
->
lateCollect
(
)
;
$this
->
assertEquals
(
0,
$dataCollector
->
getCountMissings
(
)
)
;
$this
->
assertEquals
(
0,
$dataCollector
->
getCountFallbacks
(
)
)
;
$this
->
assertEquals
(
0,
$dataCollector
->
getCountDefines
(
)
)
;
$this
->
assertEquals
(
[
]
,
$dataCollector
->
getMessages
(
)
->
getValue
(
)
)
;
}
public
function
testCollect
(
)
{
$collectedMessages
=
[
[
'id' => 'foo',
'translation' => 'foo (en)',
'locale' => 'en',
'domain' => 'messages',