88namespace Magento \TestFramework \Annotation ;
99
1010use Magento \Customer \Model \Metadata \AttributeMetadataCache ;
11+ use Magento \TestFramework \Event \Param \Transaction ;
1112use Magento \TestFramework \Helper \Bootstrap ;
1213use PHPUnit \Framework \TestCase ;
1314
@@ -37,6 +38,8 @@ public function startTest(TestCase $test)
3738 public function endTest (TestCase $ test )
3839 {
3940 $ this ->_revertFixtures ($ test );
41+ $ objectManager = Bootstrap::getObjectManager ();
42+ $ objectManager ->get (AttributeMetadataCache::class)->clean ();
4043 }
4144
4245 /**
@@ -58,18 +61,18 @@ protected function getDbIsolationState(TestCase $test)
5861 /**
5962 * @inheritdoc
6063 */
61- protected function _applyFixtures ( array $ fixtures , TestCase $ test )
64+ public function startTestTransactionRequest ( TestCase $ test , Transaction $ param ): void
6265 {
6366 Bootstrap::getInstance ()->reinitialize ();
64- parent ::_applyFixtures ( $ fixtures , $ test );
67+ parent ::startTestTransactionRequest ( $ test , $ param );
6568 }
6669
6770 /**
6871 * @inheritdoc
6972 */
70- protected function _revertFixtures (? TestCase $ test = null )
73+ public function endTestTransactionRequest ( TestCase $ test, Transaction $ param ): void
7174 {
72- parent ::_revertFixtures ($ test );
75+ parent ::endTestTransactionRequest ($ test, $ param );
7376 $ objectManager = Bootstrap::getObjectManager ();
7477 $ objectManager ->get (AttributeMetadataCache::class)->clean ();
7578 }
0 commit comments