assertGreaterThan() public method

public assertGreaterThan ( $a, $b )
コード例 #1
0
ファイル: MainFeatureContext.php プロジェクト: Raptek/nbp-php
 /**
  * @Then /^I should get the rate(s)? (?<rates>([0-9 ,\.]|and)+)$/
  */
 public function iShouldGetTheRates(array $rates)
 {
     \PHPUnit_Framework_TestCase::assertGreaterThan(0, count($rates));
     reset($this->_requested_currencies);
     foreach ($rates as $expected) {
         $requested_currency = current($this->_requested_currencies);
         $Rate = null;
         if ($this->_work_day_before) {
             $Rate = $this->_NbpRepo->getRateBefore($this->_inputDate, $requested_currency);
         } else {
             $Rate = $this->_NbpRepo->getRate($this->_inputDate, $requested_currency);
         }
         \PHPUnit_Framework_TestCase::assertEquals($expected, $Rate->avg, "", 1.0E-5);
         next($this->_requested_currencies);
     }
 }