File tree Expand file tree Collapse file tree 2 files changed +5
-15
lines changed
dev/tests/integration/testsuite/Magento
Customer/Ui/Component/Listing Expand file tree Collapse file tree 2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change 77
88namespace Magento \Customer \Ui \Component \Listing ;
99
10- use Magento \Framework \App \Cache \Manager ;
1110use Magento \TestFramework \Helper \Bootstrap ;
12- use Magento \TestFramework \ObjectManager ;
11+ use Magento \TestFramework \Helper \ CacheCleaner ;
1312use PHPUnit \Framework \TestCase ;
1413
1514/**
@@ -24,18 +23,12 @@ class AttributeRepositoryTest extends TestCase
2423 */
2524 private $ model ;
2625
27- /**
28- * @var ObjectManager
29- */
30- private $ objectManager ;
31-
3226 /**
3327 * @inheritdoc
3428 */
3529 protected function setUp (): void
3630 {
37- $ this ->objectManager = Bootstrap::getObjectManager ();
38- $ this ->model = $ this ->objectManager ->create (AttributeRepository::class);
31+ $ this ->model = Bootstrap::getObjectManager ()->create (AttributeRepository::class);
3932 }
4033
4134 /**
@@ -46,9 +39,7 @@ protected function setUp(): void
4639 */
4740 public function testGetOptionArray (): void
4841 {
49- $ cache = $ this ->objectManager ->get (Manager::class);
50- $ cache ->clean (['full_page ' , 'config ' ]);
51-
42+ CacheCleaner::cleanAll ();
5243 $ result = $ this ->model ->getMetadataByCode ('store_id ' );
5344
5445 $ this ->assertTrue (isset ($ result ['options ' ]['1 ' ]['value ' ]));
Original file line number Diff line number Diff line change 44 * See COPYING.txt for license details.
55 */
66
7- use Magento \Framework \ App \ Cache \ Manager ;
7+ use Magento \TestFramework \ Helper \ CacheCleaner ;
88
99$ objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
1010$ website = $ objectManager ->create (\Magento \Store \Model \Website::class);
6161$ indexerRegistry = $ objectManager ->create (\Magento \Framework \Indexer \IndexerRegistry::class);
6262$ indexerRegistry ->get (\Magento \CatalogSearch \Model \Indexer \Fulltext::INDEXER_ID )->reindexAll ();
6363
64- $ cache = $ objectManager ->get (Manager::class);
65- $ cache ->clean (['full_page ' , 'config ' ]);
64+ CacheCleaner::cleanAll ();
You can’t perform that action at this time.
0 commit comments