@@ 80-87 (lines=8) @@ | ||
77 | $this->quote = $this->objectManager->getObject(Quote::class); |
|
78 | } |
|
79 | ||
80 | public function testCurrentCheckoutMethodLoggedIn() |
|
81 | { |
|
82 | $this->customerSession->method('isLoggedIn')->willReturn(true); |
|
83 | ||
84 | $result = $this->checkout->getCurrentCheckoutMethod($this->quote); |
|
85 | $expected = Onepage::METHOD_CUSTOMER; |
|
86 | $this->assertEquals($expected, $result); |
|
87 | } |
|
88 | ||
89 | public function testCurrentCheckoutMethodPreset() |
|
90 | { |
|
@@ 89-97 (lines=9) @@ | ||
86 | $this->assertEquals($expected, $result); |
|
87 | } |
|
88 | ||
89 | public function testCurrentCheckoutMethodPreset() |
|
90 | { |
|
91 | $this->customerSession->method('isLoggedIn')->willReturn(false); |
|
92 | ||
93 | $expected = 'random value'; |
|
94 | $this->quote->setCheckoutMethod($expected); |
|
95 | $result = $this->checkout->getCurrentCheckoutMethod($this->quote); |
|
96 | $this->assertEquals($expected, $result); |
|
97 | } |
|
98 | ||
99 | public function testCurrentCheckoutMethodGuest() |
|
100 | { |