Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getDeprecationTagTester example
foreach
(
$this
->whiteList
as
$path
)
{
$finder
->
notPath
(
$path
)
;
}
$invalidFiles
=
[
]
;
foreach
(
$finder
->
getIterator
(
)
as
$file
)
{
$filePath
=
$file
->
getRealPath
(
)
;
$content
=
(string)
file_get_contents
(
$filePath
)
;
try
{
$this
->
getDeprecationTagTester
(
)
->
validateDeprecatedAnnotations
(
$content
)
;
$this
->
getDeprecationTagTester
(
)
->
validateExperimentalAnnotations
(
$content
)
;
}
catch
(
NoDeprecationFoundException|\InvalidArgumentException
$error
)
{
$invalidFiles
[
$filePath
]
=
$error
->
getMessage
(
)
;
}
}
static
::
assertEmpty
(
$invalidFiles
,
print_r
(
$invalidFiles
, true
)
)
;
}
public
function
testConfigFilesForWrongDeprecatedTags
(
)
: void
{