8
8
namespace Magento \TestFramework \Annotation ;
9
9
10
10
use Magento \Customer \Model \Metadata \AttributeMetadataCache ;
11
+ use Magento \TestFramework \Event \Param \Transaction ;
11
12
use Magento \TestFramework \Helper \Bootstrap ;
12
13
use PHPUnit \Framework \TestCase ;
13
14
@@ -37,6 +38,8 @@ public function startTest(TestCase $test)
37
38
public function endTest (TestCase $ test )
38
39
{
39
40
$ this ->_revertFixtures ($ test );
41
+ $ objectManager = Bootstrap::getObjectManager ();
42
+ $ objectManager ->get (AttributeMetadataCache::class)->clean ();
40
43
}
41
44
42
45
/**
@@ -58,18 +61,18 @@ protected function getDbIsolationState(TestCase $test)
58
61
/**
59
62
* @inheritdoc
60
63
*/
61
- protected function _applyFixtures ( array $ fixtures , TestCase $ test )
64
+ public function startTestTransactionRequest ( TestCase $ test , Transaction $ param ): void
62
65
{
63
66
Bootstrap::getInstance ()->reinitialize ();
64
- parent ::_applyFixtures ( $ fixtures , $ test );
67
+ parent ::startTestTransactionRequest ( $ test , $ param );
65
68
}
66
69
67
70
/**
68
71
* @inheritdoc
69
72
*/
70
- protected function _revertFixtures (? TestCase $ test = null )
73
+ public function endTestTransactionRequest ( TestCase $ test, Transaction $ param ): void
71
74
{
72
- parent ::_revertFixtures ($ test );
75
+ parent ::endTestTransactionRequest ($ test, $ param );
73
76
$ objectManager = Bootstrap::getObjectManager ();
74
77
$ objectManager ->get (AttributeMetadataCache::class)->clean ();
75
78
}
0 commit comments