File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed
framework/Magento/TestFramework/Core/Version
testsuite/Magento/Sales/Controller/Order Expand file tree Collapse file tree 2 files changed +37
-1
lines changed 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
+ declare (strict_types=1 );
7
+
8
+ namespace Magento \TestFramework \Core \Version ;
9
+
10
+ /**
11
+ * Class for magento version flag.
12
+ */
13
+ class View
14
+ {
15
+ /**
16
+ * Returns flag that checks that magento version is clean community version.
17
+ *
18
+ * @return bool
19
+ */
20
+ public function isVersionUpdated (): bool
21
+ {
22
+ return false ;
23
+ }
24
+ }
Original file line number Diff line number Diff line change 14
14
use Magento \Quote \Api \CartRepositoryInterface ;
15
15
use Magento \Quote \Api \Data \CartInterface ;
16
16
use Magento \Sales \Api \Data \OrderInterfaceFactory ;
17
+ use Magento \TestFramework \Core \Version \View ;
17
18
use Magento \TestFramework \Request ;
18
19
use Magento \TestFramework \TestCase \AbstractController ;
19
20
@@ -44,6 +45,11 @@ class ReorderTest extends AbstractController
44
45
/** @var Escaper */
45
46
private $ escaper ;
46
47
48
+ /**
49
+ * @var View
50
+ */
51
+ private $ versionChecker ;
52
+
47
53
/**
48
54
* @inheritdoc
49
55
*/
@@ -56,6 +62,7 @@ protected function setUp(): void
56
62
$ this ->customerSession = $ this ->_objectManager ->get (Session::class);
57
63
$ this ->quoteRepository = $ this ->_objectManager ->get (CartRepositoryInterface::class);
58
64
$ this ->escaper = $ this ->_objectManager ->get (Escaper::class);
65
+ $ this ->versionChecker = $ this ->_objectManager ->get (View::class);
59
66
}
60
67
61
68
/**
@@ -121,7 +128,12 @@ public function testReorderByAnotherCustomer(): void
121
128
$ this ->customerSession ->setCustomerId (1 );
122
129
$ order = $ this ->orderFactory ->create ()->loadByIncrementId ('100000555 ' );
123
130
$ this ->dispatchReorderRequest ((int )$ order ->getId ());
124
- $ this ->assertRedirect ($ this ->stringContains ('sales/order/history ' ));
131
+
132
+ if ($ this ->versionChecker ->isVersionUpdated ()) {
133
+ $ this ->assertRedirect ($ this ->stringContains ('noroute ' ));
134
+ } else {
135
+ $ this ->assertRedirect ($ this ->stringContains ('sales/order/history ' ));
136
+ }
125
137
}
126
138
127
139
/**
You can’t perform that action at this time.
0 commit comments