This repository was archived by the owner on Apr 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +44
-0
lines changed
dev/tests/setup-integration/framework/Magento/TestFramework Expand file tree Collapse file tree 3 files changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ protected function _getSubscribers(\Magento\TestFramework\Application $applicati
31
31
new \Magento \TestFramework \Annotation \ComponentRegistrarFixture ($ this ->_fixturesBaseDir ),
32
32
new \Magento \TestFramework \Annotation \SchemaFixture ($ this ->_fixturesBaseDir ),
33
33
new \Magento \TestFramework \Annotation \Cache (),
34
+ new \Magento \TestFramework \Workaround \CacheClean (),
34
35
new \Magento \TestFramework \Annotation \ReinstallInstance ($ application ),
35
36
new \Magento \TestFramework \Annotation \CopyModules (),
36
37
new \Magento \TestFramework \Annotation \DataProviderFromFile ()
Original file line number Diff line number Diff line change @@ -134,6 +134,19 @@ public function splitSales()
134
134
$ this ->shell ->execute ($ command , array_values ($ installParams ));
135
135
}
136
136
137
+ /**
138
+ * Clean all types of cache
139
+ */
140
+ public function cacheClean ()
141
+ {
142
+ $ initParams = $ this ->parametersHolder ->getInitParams ();
143
+ $ command = 'php -f ' . BP . '/bin/magento cache:clean ' .
144
+ ' -vvv --magento-init-params= ' .
145
+ $ initParams ['magento-init-params ' ];
146
+
147
+ $ this ->shell ->execute ($ command );
148
+ }
149
+
137
150
/**
138
151
* Convert from raw params to CLI arguments, like --admin-username.
139
152
*
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+
7
+ namespace Magento \TestFramework \Workaround ;
8
+
9
+ use Magento \TestFramework \Helper \Bootstrap ;
10
+
11
+ /**
12
+ * Deployment config handler.
13
+ *
14
+ * @package Magento\TestFramework\Workaround
15
+ */
16
+ class CacheClean
17
+ {
18
+ /**
19
+ * Start test.
20
+ *
21
+ * @return void
22
+ */
23
+ public function startTest ()
24
+ {
25
+ /** @var \Magento\Framework\App\Cache\Manager $cacheManager */
26
+ $ cacheManager = Bootstrap::getObjectManager ()->get (\Magento \Framework \App \Cache \Manager::class);
27
+ $ types = $ cacheManager ->getAvailableTypes ();
28
+ $ cacheManager ->clean ($ types );
29
+ }
30
+ }
You can’t perform that action at this time.
0 commit comments