Use array_merge() instead of +=
To avoid overriding items
This commit is contained in:
parent
83863bd66c
commit
6fc294afbe
1 changed files with 2 additions and 2 deletions
|
@ -53,10 +53,10 @@ abstract class BaseTest extends TestCase
|
||||||
$requires = [];
|
$requires = [];
|
||||||
|
|
||||||
if (isset($annotations['class']['requires'])) {
|
if (isset($annotations['class']['requires'])) {
|
||||||
$requires += $annotations['class']['requires'];
|
$requires = array_merge($requires, $annotations['class']['requires']);
|
||||||
}
|
}
|
||||||
if (isset($annotations['method']['requires'])) {
|
if (isset($annotations['method']['requires'])) {
|
||||||
$requires += $annotations['method']['requires'];
|
$requires = array_merge($requires, $annotations['method']['requires']);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($requires as $require) {
|
foreach ($requires as $require) {
|
||||||
|
|
Loading…
Reference in a new issue