public function testFindAllDeposit() { $depositName = "forFindDeposit"; $depositName2 = "forFindDeposit2"; $deposit = getDepositInstance($depositName); $deposit2 = getDepositInstance($depositName2); $deposits = array(); array_push($deposits, $deposit, $deposit2); $bmapper = new DepositMapper(self::$pdo); $bmapper->insert($deposits); $newDeposits = $bmapper->findAll()->fetchAll(); $this->assertEquals(2, count($newDeposits)); }
public function testfindLOCAByUserID() { $pmapper = new PaymentMapper(self::$pdo); $dmapper = new DepositMapper(self::$pdo); $dbfacade = DBFacade::I(self::$pdo); $payment = getPaymentInstance(); $deposit = getDepositInstance(); $pmapper->insert($payment); $dmapper->insert($deposit); $result = $dbfacade->findLOCALogByUserID(1); // instanceは二つともuser_id=1になっているため $this->assertEquals(2, count($result)); }