Skip to content

Commit 3e456b2

Browse files
committed
Fix static test
1 parent 689c1f6 commit 3e456b2

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

app/code/Magento/Sales/Test/Unit/Controller/Guest/ReorderTest.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ class ReorderTest extends TestCase
3636
*/
3737
private $reorder;
3838

39-
/**
40-
* @var Context|MockObject
41-
*/
42-
private $contextMock;
43-
4439
/**
4540
* @var Registry|MockObject
4641
*/
@@ -76,18 +71,18 @@ class ReorderTest extends TestCase
7671
*/
7772
protected function setUp()
7873
{
79-
$this->contextMock = $this->createMock(Context::class);
74+
$contextMock = $this->createMock(Context::class);
8075
$this->registryMock = $this->createMock(Registry::class);
8176
$this->orderLoaderMock = $this->createMock(OrderLoader::class);
8277
$this->requestMock = $this->createMock(RequestInterface::class);
8378
$this->resultRedirectFactoryMock = $this->createMock(RedirectFactory::class);
8479
$this->reorderHelperMock = $this->createMock(ReorderHelper::class);
8580
$this->messageManagerMock = $this->createMock(MessageManagerInterface::class);
8681

87-
$this->contextMock->expects($this->once())->method('getRequest')->willReturn($this->requestMock);
88-
$this->contextMock->expects($this->once())->method('getResultRedirectFactory')
82+
$contextMock->expects($this->once())->method('getRequest')->willReturn($this->requestMock);
83+
$contextMock->expects($this->once())->method('getResultRedirectFactory')
8984
->willReturn($this->resultRedirectFactoryMock);
90-
$this->contextMock->expects($this->once())->method('getMessageManager')
85+
$contextMock->expects($this->once())->method('getMessageManager')
9186
->willReturn($this->messageManagerMock);
9287

9388
$objectManagerMock = $this->createMock(ObjectManagerInterface::class);
@@ -101,7 +96,7 @@ protected function setUp()
10196
$this->reorder = $objectManager->getObject(
10297
Reorder::class,
10398
[
104-
'context' => $this->contextMock,
99+
'context' => $contextMock,
105100
'orderLoader' => $this->orderLoaderMock,
106101
'registry' => $this->registryMock
107102
]

0 commit comments

Comments
 (0)