public function testDeleteBestProducts_データ削除後_ランクは変動しない() { SC_Helper_BestProducts_Ex::deleteBestProducts("1001"); $this->expected = "2"; $arrRet = SC_Helper_BestProducts_Ex::getBestProducts('1002', true); $this->actual = $arrRet['rank']; $this->verify(); }
/** * データを削除する * @param Array $arrPost POSTの値を格納した配列 * @param SC_Helper_BestProducts_Ex $objRecommend * @return void */ public function deleteProduct($arrPost, SC_Helper_BestProducts_Ex &$objRecommend) { if ($arrPost['best_id']) { $target = $arrPost['best_id']; } else { $recommend = $objRecommend->getByRank($arrPost['rank']); $target = $recommend['best_id']; } $objRecommend->deleteBestProducts($target); }