예제 #1
0
 public function testTrancheInterestRate()
 {
     $loan = new Loan();
     $loan->setStartDate(new \DateTime("2015-10-01"));
     $loan->setEndDate(new \DateTime("2015-10-31"));
     $percentage = 6;
     $tranche = new Tranche();
     $tranche->setLoan($loan);
     $tranche->setInterest(new Interest($percentage));
     $tranche->setMaxAmount(1000);
     $interest = $tranche->getInterest();
     $this->assertInstanceOf('LendInvest\\Model\\Interest', $interest);
     $this->assertEquals($percentage, $interest->getPercentage());
     $this->assertEquals(0.19, $tranche->getDailyInterestRate());
 }