Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
FinalPublicClass example
public
function
testStringMagicGet
(
)
{
$proxy
=
$this
->
createLazyProxy
(
StringMagicGetClass::
class
,
fn
(
)
=>
new
StringMagicGetClass
(
)
)
;
$this
->
assertSame
(
'abc',
$proxy
->abc
)
;
}
public
function
testFinalPublicClass
(
)
{
$proxy
=
$this
->
createLazyProxy
(
FinalPublicClass::
class
,
fn
(
)
=>
new
FinalPublicClass
(
)
)
;
$this
->
assertSame
(
1,
$proxy
->
increment
(
)
)
;
$this
->
assertSame
(
2,
$proxy
->
increment
(
)
)
;
$this
->
assertSame
(
1,
$proxy
->
decrement
(
)
)
;
}
public
function
testOverwritePropClass
(
)
{
$proxy
=
$this
->
createLazyProxy
(
TestOverwritePropClass::
class
,
fn
(
)
=>
new
TestOverwritePropClass
(
'123', 5
)
)
;
$this
->
assertSame
(
'123',
$proxy
->
getDep
(
)
)
;