/** * Tests setter and getter. */ public function testSetGeSelectList() { $aSelectList = array('testable' => 'selection list'); $oArticleToExpressCheckoutValidator = new oePayPalArticleToExpressCheckoutCurrentItem(); $oArticleToExpressCheckoutValidator->setSelectList($aSelectList); $this->assertEquals($aSelectList, $oArticleToExpressCheckoutValidator->getSelectList()); }
/** * Checks if item is same in given basket, if so, item is not valid * * @dataProvider providerIsArticleValid_False */ public function testIsArticleValid_False($sProductId, $aSelectionList, $aPersistentParam, $iAmount) { $sBasketProductId = 'ProductId'; $aBasketSelectionList = array('testable' => 'list'); $aBasketPersistentParam = array('testable' => 'persistent param'); $oBasket = $this->_createBasket($sBasketProductId, $aBasketSelectionList, $aBasketPersistentParam); $oArticleToExpressCheckoutCurrentItem = new oePayPalArticleToExpressCheckoutCurrentItem(); $oArticleToExpressCheckoutValidator = new oePayPalArticleToExpressCheckoutValidator(); $oArticleToExpressCheckoutCurrentItem->setPersistParam($aPersistentParam); $oArticleToExpressCheckoutCurrentItem->setSelectList($aSelectionList); $oArticleToExpressCheckoutCurrentItem->setArticleId($sProductId); $oArticleToExpressCheckoutCurrentItem->setArticleAmount($iAmount); $oArticleToExpressCheckoutValidator->setBasket($oBasket); $oArticleToExpressCheckoutValidator->setItemToValidate($oArticleToExpressCheckoutCurrentItem); $this->assertFalse($oArticleToExpressCheckoutValidator->isArticleValid()); }