Skip to content

Commit

Permalink
Merge branch 'develop' into fix-promo-rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Santiagoebizmarts authored Mar 6, 2018
2 parents e043421 + f5723cc commit ba6ffe0
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,6 @@ public function testGetNewPromoRule()
->disableOriginalConstructor()
->getMock();

$mailChimpHelperMock = $this->getMockBuilder(Ebizmarts_MailChimp_Helper_Data::class)
->setMethods(array('getDateMicrotime'))
->disableOriginalConstructor()
->getMock();

$promoRulesApiMock->expects($this->once())->method('getMailChimpHelper')->willReturn($mailChimpHelperMock);
$mailChimpHelperMock->expects($this->once())->method('getDateMicrotime')->willReturn('2017-05-18-14-45-54-38849500');
$promoRulesApiMock->expects($this->once())->method('getPromoRule')->with(self::PROMORULE_ID)->willReturn($promoRuleMock);
$promoRulesApiMock->expects($this->once())->method('generateRuleData')->with($promoRuleMock)->willReturn($promoRuleData);

Expand All @@ -85,7 +78,7 @@ public function testGetNewPromoRule()
$this->assertArrayHasKey("body", $return);
$this->assertEquals("POST", $return["method"]);
$this->assertRegExp("/\/ecommerce\/stores\/(.*)\/promo-rules/", $return["path"]);
$this->assertEquals(self::BATCH_ID . '_' . self::PROMORULE_ID, $return["operation_id"]);
$this->assertEquals(self::BATCH_ID . "_" . Ebizmarts_MailChimp_Model_Config::IS_PROMO_RULE . '_' . self::PROMORULE_ID, $return["operation_id"]);
}

public function testMakePromoRulesCollection()
Expand Down

0 comments on commit ba6ffe0

Please sign in to comment.