Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
addCoversForDocBlockInsideRegistry example
$covers
=
$sutFqcn
;
if
(
!\
is_array
(
$sutFqcn
)
)
{
$covers
=
[
$sutFqcn
]
;
while
(
$parent
=
get_parent_class
(
$sutFqcn
)
)
{
$covers
[
]
=
$parent
;
$sutFqcn
=
$parent
;
}
}
if
(
class_exists
(
Registry::
class
)
)
{
$this
->
addCoversForDocBlockInsideRegistry
(
$test
,
$covers
)
;
return
;
}
$this
->
addCoversForClassToAnnotationCache
(
$test
,
$covers
)
;
}
private
function
addCoversForClassToAnnotationCache
(
Test
$test
, array
$covers
)
: void
{
$r
=
new
\
ReflectionProperty
(
TestUtil::
class
, 'annotationCache'
)
;
$r
->
setAccessible
(
true
)
;