/** * @test */ public function testCalculateDerivesLoanLimitCheck() { $inputArray = $this->testInputForm->getSampleForm(); $testLoanProperty = new LoanProperty($inputArray); $testLoanProperty->loanAmount = 2000001; //loanAmount more than 2million $this->assertFalse($testLoanProperty->loanLimitCheck()); $testLoanProperty->loanAmount = 49999; //loanAmount < 50000 $this->assertFalse($testLoanProperty->loanLimitCheck()); //reset loanAmount $testLoanProperty->loanAmount = $inputArray['loanAmount']; // creditScore for Purchasing $testLoanProperty->creditScore = 670; // credit score < 680 $this->assertFalse($testLoanProperty->loanLimitCheck()); $testLoanProperty->creditScore = 680; // credit score < 680 $this->assertTrue($testLoanProperty->loanLimitCheck()); $testLoanProperty->creditScore = $inputArray['creditScore']; //LTV for purchasing $LV_save = $testLoanProperty->LTV; $testLoanProperty->LTV = 0.97; // max LTV for purchase $this->assertFalse($testLoanProperty->loanLimitCheck()); $testLoanProperty->LTV = 0.96; $this->assertTrue($testLoanProperty->loanLimitCheck()); $testLoanProperty->LTV = $LV_save; }