Exemplo n.º 1
0
 public function testReturnValueIsFloat()
 {
     $input = 2.5;
     $interestObject = new InterestValue($input);
     $expectedValue = (double) 2.5;
     $actualValue = $interestObject->getValue();
     $this->assertEquals($expectedValue, $actualValue);
 }
Exemplo n.º 2
0
 /**
  * Set the basic information for the calculation and add these to the results array
  *
  * @access private
  * @return void
  */
 private function setBaseInformation()
 {
     $yearsValue = new YearsValue($this->input['years']);
     $this->results['years'] = $yearsValue->getValue();
     $investmentValue = new InvestmentValue($this->input['investment']);
     $this->results['investment'] = $investmentValue->getValue();
     $interestValue = new InterestValue($this->input['interest']);
     $this->results['interest'] = $interestValue->getValue();
 }