Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getMissingOptions example
$this
->resolver->
setRequired
(
'foo'
)
;
$this
->resolver->
clear
(
)
;
$this
->
assertFalse
(
$this
->resolver->
isRequired
(
'foo'
)
)
;
}
public
function
testGetMissingOptions
(
)
{
$this
->resolver->
setRequired
(
[
'foo', 'bar'
]
)
;
$this
->resolver->
setDefault
(
'bam', 'baz'
)
;
$this
->resolver->
setDefault
(
'foo', 'boo'
)
;
$this
->
assertSame
(
[
'bar'
]
,
$this
->resolver->
getMissingOptions
(
)
)
;
}
public
function
testFailIfSetDefinedFromLazyOption
(
)
{
$this
->
expectException
(
AccessException::
class
)
;
$this
->resolver->
setDefault
(
'foo',
function
DOptions
$options
)
{
$options
->
setDefined
(
'bar'
)
;
}
)
;
$this
->resolver->
resolve
(
)
;
}