|
@@ 112-118 (lines=7) @@
|
| 109 |
|
{ |
| 110 |
|
$contexts = $suite->getSetting('contexts'); |
| 111 |
|
|
| 112 |
|
if (!is_array($contexts)) { |
| 113 |
|
throw new SuiteConfigurationException(sprintf( |
| 114 |
|
'"contexts" setting of the "%s" suite is expected to be an array, %s given.', |
| 115 |
|
$suite->getName(), |
| 116 |
|
gettype($contexts) |
| 117 |
|
), $suite->getName()); |
| 118 |
|
} |
| 119 |
|
|
| 120 |
|
return array_map([$this, 'normalizeContext'], $contexts); |
| 121 |
|
} |
|
@@ 127-133 (lines=7) @@
|
| 124 |
|
{ |
| 125 |
|
$contexts = $suite->getSetting('contexts'); |
| 126 |
|
|
| 127 |
|
if (!is_array($contexts)) { |
| 128 |
|
throw new SuiteConfigurationException(sprintf( |
| 129 |
|
'"contexts" setting of the "%s" suite is expected to be an array, %s given.', |
| 130 |
|
$suite->getName(), |
| 131 |
|
gettype($contexts) |
| 132 |
|
), $suite->getName()); |
| 133 |
|
} |
| 134 |
|
|
| 135 |
|
$contexts = array_filter($contexts, function ($context) use ($contextsToRemove): bool { |
| 136 |
|
return !in_array($this->normalizeContext($context), $contextsToRemove, true); |