function get_price_with_buyer_id_success() { global $connection; $auctionId = 5; $startingPrice = 1; $result = get_price_with_buyer_id($auctionId, $startingPrice); assert($result['value'] == EXPECTED_PRICE_FOR_AUCTION_5); assert($result['user_id'] = 38); }
function retrieve_followed_by_user() { $auction_set = query_select_followed_by_user($_SESSION['userId']); for ($i = 0; $i < sizeof($auction_set); $i++) { //append the result of get_price($auctionId, $auctionStartingPrice) to //each auction associative array $winning_bid = get_price_with_buyer_id($auction_set[$i]['auctionId'], $auction_set[$i]['startingPrice']); $auction_set[$i]['winning_price'] = $winning_bid['value']; $auction_set[$i]['winner_id'] = $winning_bid['user_id']; } return $auction_set; }