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 1414use Magento \Quote \Api \CartRepositoryInterface ;
1515use Magento \Quote \Api \Data \CartInterface ;
1616use Magento \Sales \Api \Data \OrderInterfaceFactory ;
17+ use Magento \TestFramework \Core \Version \View ;
1718use Magento \TestFramework \Request ;
1819use Magento \TestFramework \TestCase \AbstractController ;
1920
@@ -44,6 +45,11 @@ class ReorderTest extends AbstractController
4445 /** @var Escaper */
4546 private $ escaper ;
4647
48+ /**
49+ * @var View
50+ */
51+ private $ versionChecker ;
52+
4753 /**
4854 * @inheritdoc
4955 */
@@ -56,6 +62,7 @@ protected function setUp(): void
5662 $ this ->customerSession = $ this ->_objectManager ->get (Session::class);
5763 $ this ->quoteRepository = $ this ->_objectManager ->get (CartRepositoryInterface::class);
5864 $ this ->escaper = $ this ->_objectManager ->get (Escaper::class);
65+ $ this ->versionChecker = $ this ->_objectManager ->get (View::class);
5966 }
6067
6168 /**
@@ -121,7 +128,12 @@ public function testReorderByAnotherCustomer(): void
121128 $ this ->customerSession ->setCustomerId (1 );
122129 $ order = $ this ->orderFactory ->create ()->loadByIncrementId ('100000555 ' );
123130 $ 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+ }
125137 }
126138
127139 /**
You can’t perform that action at this time.
0 commit comments