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 7
7
8
8
namespace Magento \Customer \Ui \Component \Listing ;
9
9
10
- use Magento \Framework \App \Cache \Manager ;
11
10
use Magento \TestFramework \Helper \Bootstrap ;
12
- use Magento \TestFramework \ObjectManager ;
11
+ use Magento \TestFramework \Helper \ CacheCleaner ;
13
12
use PHPUnit \Framework \TestCase ;
14
13
15
14
/**
@@ -24,18 +23,12 @@ class AttributeRepositoryTest extends TestCase
24
23
*/
25
24
private $ model ;
26
25
27
- /**
28
- * @var ObjectManager
29
- */
30
- private $ objectManager ;
31
-
32
26
/**
33
27
* @inheritdoc
34
28
*/
35
29
protected function setUp (): void
36
30
{
37
- $ this ->objectManager = Bootstrap::getObjectManager ();
38
- $ this ->model = $ this ->objectManager ->create (AttributeRepository::class);
31
+ $ this ->model = Bootstrap::getObjectManager ()->create (AttributeRepository::class);
39
32
}
40
33
41
34
/**
@@ -46,9 +39,7 @@ protected function setUp(): void
46
39
*/
47
40
public function testGetOptionArray (): void
48
41
{
49
- $ cache = $ this ->objectManager ->get (Manager::class);
50
- $ cache ->clean (['full_page ' , 'config ' ]);
51
-
42
+ CacheCleaner::cleanAll ();
52
43
$ result = $ this ->model ->getMetadataByCode ('store_id ' );
53
44
54
45
$ this ->assertTrue (isset ($ result ['options ' ]['1 ' ]['value ' ]));
Original file line number Diff line number Diff line change 4
4
* See COPYING.txt for license details.
5
5
*/
6
6
7
- use Magento \Framework \ App \ Cache \ Manager ;
7
+ use Magento \TestFramework \ Helper \ CacheCleaner ;
8
8
9
9
$ objectManager = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ();
10
10
$ website = $ objectManager ->create (\Magento \Store \Model \Website::class);
61
61
$ indexerRegistry = $ objectManager ->create (\Magento \Framework \Indexer \IndexerRegistry::class);
62
62
$ indexerRegistry ->get (\Magento \CatalogSearch \Model \Indexer \Fulltext::INDEXER_ID )->reindexAll ();
63
63
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