File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
dev/tests/api-functional/framework/Magento/TestFramework Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -57,4 +57,12 @@ protected function getAnnotation(): string
57
57
{
58
58
return self ::ANNOTATION ;
59
59
}
60
+
61
+ /**
62
+ * @inheritdoc
63
+ */
64
+ protected function getDbIsolationState (TestCase $ test )
65
+ {
66
+ return parent ::getDbIsolationState ($ test ) ?: ['disabled ' ];
67
+ }
60
68
}
Original file line number Diff line number Diff line change @@ -28,11 +28,19 @@ protected function _getSubscribers(\Magento\TestFramework\Application $applicati
28
28
{
29
29
$ subscribers = parent ::_getSubscribers ($ application );
30
30
foreach ($ subscribers as $ key => $ subscriber ) {
31
- if (in_array ( get_class ($ subscriber ), [ ConfigFixture::class, Transaction::class]) ) {
31
+ if (get_class ($ subscriber ) == ConfigFixture::class) {
32
32
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
+ );
33
42
}
34
43
}
35
- $ subscribers [] = new \Magento \TestFramework \Annotation \ApiDataFixture ();
36
44
$ subscribers [] = new ApiConfigFixture ();
37
45
38
46
return $ subscribers ;
You can’t perform that action at this time.
0 commit comments