Skip to content

Commit 79c3bcf

Browse files
author
Michail Slabko
committed
MAGETWO-31159: Varnish coverage increase
- fix tests
1 parent 880de97 commit 79c3bcf

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

app/code/Magento/Checkout/Block/Cart/ValidationMessages.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ public function validateMinimunAmount()
6969
if (!$this->cartHelper->getQuote()->validateMinimumAmount()) {
7070
$warning = $this->_scopeConfig->getValue(
7171
'sales/minimum_order/description',
72-
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
72+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
7373
);
7474
if (!$warning) {
7575
$currencyCode = $this->_storeManager->getStore()->getCurrentCurrencyCode();
7676
$minimumAmount = $this->currency->getCurrency($currencyCode)->toCurrency(
7777
$this->_scopeConfig->getValue(
7878
'sales/minimum_order/amount',
79-
\Magento\Framework\Store\ScopeInterface::SCOPE_STORE
79+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
8080
)
8181
);
8282
$warning = __('Minimum order amount is %1', $minimumAmount);

dev/tests/functional/tests/app/Magento/Customer/Test/Constraint/AssertCustomerDefaultAddresses.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class AssertCustomerDefaultAddresses extends AbstractConstraint
2929
public function processAssert(CustomerAccountIndex $customerAccountIndex, Address $address)
3030
{
3131
$customerAccountIndex->getAccountMenuBlock()->openMenuItem('Account Dashboard');
32-
sleep(3);
32+
sleep(6);
3333
$defaultBillingAddress = explode(
3434
"\n",
3535
$customerAccountIndex->getDashboardAddress()->getDefaultBillingAddressText()

dev/tests/unit/testsuite/Magento/Wishlist/Controller/Index/AddTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ public function testExecuteWithoutProductId()
255255
->method('getParams')
256256
->will($this->returnValue([]));
257257

258-
$om = $this->getMock('Magento\Framework\App\ObjectManager', null, [], '', false );
258+
$om = $this->getMock('Magento\Framework\App\ObjectManager', null, [], '', false);
259259
$response = $this->getMock('Magento\Framework\App\Response\Http', null, [], '', false);
260260
$eventManager = $this->getMock('Magento\Framework\Event\Manager', null, [], '', false);
261261
$url = $this->getMock('Magento\Framework\Url', null, [], '', false);
@@ -350,9 +350,9 @@ public function testExecuteWithProductIdAndWithoutProduct()
350350
->method('getParams')
351351
->will($this->returnValue(['product' => 2]));
352352

353-
$om = $this->getMock('Magento\Framework\App\ObjectManager', null, [], '', false );
353+
$om = $this->getMock('Magento\Framework\App\ObjectManager', null, [], '', false);
354354
$response = $this->getMock('Magento\Framework\App\Response\Http', null, [], '', false);
355-
$eventManager = $this->getMock('Magento\Framework\Event\Manager', null, [], '', false );
355+
$eventManager = $this->getMock('Magento\Framework\Event\Manager', null, [], '', false);
356356
$url = $this->getMock('Magento\Framework\Url', null, [], '', false);
357357
$actionFlag = $this->getMock('Magento\Framework\App\ActionFlag', null, [], '', false);
358358
$redirect = $this->getMock('\Magento\Store\App\Response\Redirect', ['redirect'], [], '', false);
@@ -460,9 +460,9 @@ public function testExecuteWithProductAndCantAddProductToWishlist()
460460
->method('getParams')
461461
->will($this->returnValue(['product' => 2]));
462462

463-
$om = $this->getMock('Magento\Framework\App\ObjectManager', null, [], '', false );
463+
$om = $this->getMock('Magento\Framework\App\ObjectManager', null, [], '', false);
464464
$response = $this->getMock('Magento\Framework\App\Response\Http', null, [], '', false);
465-
$eventManager = $this->getMock('Magento\Framework\Event\Manager', null, [], '', false );
465+
$eventManager = $this->getMock('Magento\Framework\Event\Manager', null, [], '', false);
466466
$url = $this->getMock('Magento\Framework\Url', null, [], '', false);
467467
$actionFlag = $this->getMock('Magento\Framework\App\ActionFlag', null, [], '', false);
468468
$redirect = $this->getMock('\Magento\Store\App\Response\Redirect', ['redirect'], [], '', false);
@@ -589,7 +589,7 @@ public function testExecuteProductAddedToWishlistAfterObjectManagerThrowExceptio
589589
->will($this->returnValue($product));
590590

591591
$exception = new \Exception('Exception');
592-
$wishListItem = new \stdClass();
592+
$wishListItem = new \stdClass();
593593

594594
$wishlist = $this->getMock('Magento\Wishlist\Model\Wishlist', ['addNewItem', 'save', 'getId'], [], '', false);
595595
$wishlist
@@ -649,8 +649,8 @@ public function testExecuteProductAddedToWishlistAfterObjectManagerThrowExceptio
649649
->method('critical')
650650
->with($exception)
651651
->will($this->returnValue(true));
652-
653-
$om = $this->getMock('Magento\Framework\App\ObjectManager', ['get'], [], '', false );
652+
653+
$om = $this->getMock('Magento\Framework\App\ObjectManager', ['get'], [], '', false);
654654
$om
655655
->expects($this->at(0))
656656
->method('get')
@@ -671,9 +671,9 @@ public function testExecuteProductAddedToWishlistAfterObjectManagerThrowExceptio
671671
->method('get')
672672
->with('Psr\Log\LoggerInterface')
673673
->will($this->returnValue($logger));
674-
674+
675675
$response = $this->getMock('Magento\Framework\App\Response\Http', null, [], '', false);
676-
$eventManager = $this->getMock('Magento\Framework\Event\Manager', ['dispatch'], [], '', false );
676+
$eventManager = $this->getMock('Magento\Framework\Event\Manager', ['dispatch'], [], '', false);
677677
$eventManager
678678
->expects($this->once())
679679
->method('dispatch')

0 commit comments

Comments
 (0)