Skip to content

Commit

Permalink
Better workaround for TestSetter
Browse files Browse the repository at this point in the history
  • Loading branch information
jissereitsma committed Nov 17, 2020
1 parent 3a871f9 commit 4ee30cb
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions framework/ReachDigital/TestFramework/Bootstrap/DocBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ protected function _getSubscribers(\Magento\TestFramework\Application $applicati
// new \Magento\TestFramework\Workaround\Cleanup\StaticProperties(),
new \Magento\TestFramework\Isolation\WorkingDirectory(),
new \Magento\TestFramework\Isolation\DeploymentConfig(),
];

if (class_exists(\Magento\TestFramework\Workaround\Override\Fixture\Resolver\TestSetter::class)) {
$subscribers[] = new \Magento\TestFramework\Workaround\Override\Fixture\Resolver\TestSetter();
}

$subscribers = array_merge($subscribers, [
new \ReachDigital\TestFramework\Annotation\AppIsolation($application),
new \Magento\TestFramework\Annotation\IndexerDimensionMode($application),
new \Magento\TestFramework\Isolation\AppConfig(),
Expand All @@ -35,11 +42,7 @@ protected function _getSubscribers(\Magento\TestFramework\Application $applicati
new \Magento\TestFramework\Annotation\Cache($application),
new \Magento\TestFramework\Annotation\AdminConfigFixture(),
new \Magento\TestFramework\Annotation\ConfigFixture(),
];

if (class_exists(\Magento\TestFramework\Workaround\Override\Fixture\Resolver\TestSetter::class)) {
$subscribers[] = new \Magento\TestFramework\Workaround\Override\Fixture\Resolver\TestSetter();
}
]);

return $subscribers;
}
Expand Down

0 comments on commit 4ee30cb

Please sign in to comment.