Skip to content

Commit

Permalink
Fix tests following merge
Browse files Browse the repository at this point in the history
  • Loading branch information
sta1r committed Jan 10, 2022
1 parent 24e44c3 commit b6e6796
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions Test/Unit/Model/AbandonedCart/ProgramEnrolmentEnrollerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
use Dotdigitalgroup\Email\Model\ResourceModel\Order\Collection;
use Dotdigitalgroup\Email\Model\ResourceModel\Order\CollectionFactory;
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
use Magento\Store\Model\StoreManagerInterface;
use Magento\Store\Api\Data\StoreInterface;
use PHPUnit\Framework\TestCase;

class ProgramEnrolmentEnrollerTest extends TestCase
Expand Down Expand Up @@ -130,8 +128,7 @@ protected function setUp() :void
$this->rules,
$this->cartInsight,
$this->automationCollectionFactoryMock,
$this->timeLimitMock,
$this->storeManagerMock
$this->timeLimitMock
);
}

Expand All @@ -157,14 +154,6 @@ public function testAutomationIsSavedIfQuoteHasItemsAndNoAbandonedCartLimit()
->method('getAbandonedCartTimeLimit')
->willReturn(null);

$this->storeManagerMock->expects($this->atLeastOnce())
->method('getStore')
->with($storeId = 1)
->willReturn($this->storeInterfaceMock);

$this->storeInterfaceMock->expects($this->atLeastOnce())
->method('getWebsiteId')
->willReturn($websiteId = 1);
$this->saver->expects($this->atLeastOnce())
->method('save');

Expand Down Expand Up @@ -193,15 +182,6 @@ public function testAutomationIsSavedIfQuoteHasItemsAndAbandonedCartLimitPasses(
->method('getSize')
->willReturn(0);

$this->storeManagerMock->expects($this->atLeastOnce())
->method('getStore')
->with($storeId = 1)
->willReturn($this->storeInterfaceMock);

$this->storeInterfaceMock->expects($this->atLeastOnce())
->method('getWebsiteId')
->willReturn($websiteId = 1);

$this->saver->expects($this->atLeastOnce())
->method('save');

Expand Down Expand Up @@ -230,15 +210,6 @@ public function testAutomationIsNotSavedIfQuoteHasItemsAndAbandonedCartLimitFail
->method('getSize')
->willReturn(1);

$this->storeManagerMock->expects($this->atLeastOnce())
->method('getStore')
->with($storeId = 1)
->willReturn($this->storeInterfaceMock);

$this->storeInterfaceMock->expects($this->atLeastOnce())
->method('getWebsiteId')
->willReturn($websiteId = 1);

$this->saver->expects($this->never())
->method('save');

Expand Down

0 comments on commit b6e6796

Please sign in to comment.