public function testIsValid() { $product = $this->dummyData->getProduct(); $catalogPromotion = new CatalogPromotion(); $catalogPromotion->setCode('20PCTOFF'); $this->assertTrue($catalogPromotion->isValid(new DateTime(), $product)); }
public function getCatalogPromotion() { $catalogPromotion = new CatalogPromotion(); $catalogPromotion->setName('Test Catalog Promotion'); $catalogPromotion->setCode('20PCTOFF'); $catalogPromotion->setValue(20); return $catalogPromotion; }