Example #1
0
 public function testGetYearAmount()
 {
     $c1 = $this->getMock('JLM\\ContractBundle\\Model\\ContractInterface');
     $c2 = $this->getMock('JLM\\ContractBundle\\Model\\ContractInterface');
     $c1->expects($this->once())->method('getFee')->will($this->returnValue(100.0));
     $c2->expects($this->once())->method('getFee')->will($this->returnValue(200.0));
     $this->entity->addContract($c1);
     $this->entity->addContract($c2);
     $this->assertSame(300.0, $this->entity->getYearAmount());
 }