File tree Expand file tree Collapse file tree 2 files changed +45
-2
lines changed
app/code/Magento/Indexer/Test/Fixture
dev/tests/integration/testsuite/Magento/Sales/_files Expand file tree Collapse file tree 2 files changed +45
-2
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /************************************************************************
3
+ *
4
+ * Copyright 2024 Adobe
5
+ * All Rights Reserved.
6
+ *
7
+ * NOTICE: All information contained herein is, and remains
8
+ * the property of Adobe and its suppliers, if any. The intellectual
9
+ * and technical concepts contained herein are proprietary to Adobe
10
+ * and its suppliers and are protected by all applicable intellectual
11
+ * property laws, including trade secret and copyright laws.
12
+ * Dissemination of this information or reproduction of this material
13
+ * is strictly forbidden unless prior written permission is obtained
14
+ * from Adobe.
15
+ * ************************************************************************
16
+ */
17
+ declare (strict_types=1 );
18
+
19
+ namespace Magento \Indexer \Test \Fixture ;
20
+
21
+ use Magento \Framework \DataObject ;
22
+ use Magento \Indexer \Model \Processor ;
23
+ use Magento \TestFramework \Fixture \DataFixtureInterface ;
24
+
25
+ class UpdateMview implements DataFixtureInterface
26
+ {
27
+ /**
28
+ * @param Processor $processor
29
+ */
30
+ public function __construct (
31
+ private readonly Processor $ processor
32
+ ) {
33
+ }
34
+
35
+ /**
36
+ * @inheritDoc
37
+ */
38
+ public function apply (array $ data = []): ?DataObject
39
+ {
40
+ $ this ->processor ->updateMview ();
41
+ return null ;
42
+ }
43
+ }
Original file line number Diff line number Diff line change 4
4
* See COPYING.txt for license details.
5
5
*/
6
6
7
- \Magento \TestFramework \Helper \Bootstrap::getInstance ()->loadArea ('frontend ' );
8
-
9
7
$ storeManager = Magento \TestFramework \Helper \Bootstrap::getObjectManager ()
10
8
->get (\Magento \Store \Model \StoreManagerInterface::class);
11
9
$ product = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()->create (\Magento \Catalog \Model \Product::class);
31
29
->setWebsiteIds ([$ storeManager ->getStore ()->getWebsiteId ()])
32
30
->save ();
33
31
32
+ \Magento \TestFramework \Helper \Bootstrap::getInstance ()->loadArea ('frontend ' );
33
+
34
34
$ productRepository = \Magento \TestFramework \Helper \Bootstrap::getObjectManager ()
35
35
->create (\Magento \Catalog \Api \ProductRepositoryInterface::class);
36
36
$ product = $ productRepository ->get ('simple ' );
You can’t perform that action at this time.
0 commit comments