Skip to content

Commit ab81ebb

Browse files
committed
ACP2E-782: Create PHP Attribute that must be used instead of magentoDataFixture for executing parameterized fixtures in the test
1 parent eab6d10 commit ab81ebb

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

dev/tests/api-functional/framework/Magento/TestFramework/Bootstrap/WebapiDocBlock.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,18 @@ protected function _getSubscribers(\Magento\TestFramework\Application $applicati
2828
{
2929
$subscribers = parent::_getSubscribers($application);
3030
foreach ($subscribers as $key => $subscriber) {
31-
if (get_class($subscriber) == ConfigFixture::class) {
31+
if (get_class($subscriber) === ConfigFixture::class || get_class($subscriber) === Transaction::class) {
3232
unset($subscribers[$key]);
33-
} elseif (get_class($subscriber) == Transaction::class) {
34-
$subscribers[$key] = new \Magento\TestFramework\Event\Transaction(
35-
new \Magento\TestFramework\EventManager(
36-
[
37-
new \Magento\TestFramework\Annotation\DbIsolation(),
38-
new \Magento\TestFramework\Annotation\ApiDataFixture(),
39-
]
40-
)
41-
);
4233
}
4334
}
35+
$subscribers[] = new \Magento\TestFramework\Event\Transaction(
36+
new \Magento\TestFramework\EventManager(
37+
[
38+
new \Magento\TestFramework\Annotation\DbIsolation(),
39+
new \Magento\TestFramework\Annotation\ApiDataFixture(),
40+
]
41+
)
42+
);
4443
$subscribers[] = new ApiConfigFixture();
4544

4645
return $subscribers;

0 commit comments

Comments
 (0)