コード例 #1
0
ファイル: UtilTest.php プロジェクト: robertodormepoco/zf2
 public function testFindGreatestBoundedValueFailsWhenNegativelyBounded()
 {
     $data = array(-1 => null, 0 => null, 1 => null, 2 => null, 3 => null, 5 => null, -2 => null);
     $this->setExpectedException('Zend\\GData\\app\\Exception');
     App\Util::findGreatestBoundedValue(-1, $data);
 }
コード例 #2
0
ファイル: UtilTest.php プロジェクト: bradley-holt/zf2
 public function testFindGreatestBoundedValueFailsWhenNegativelyBounded()
 {
     $data = array(-1 => null, 0 => null, 1 => null, 2 => null, 3 => null, 5 => null, -2 => null);
     try {
         $result = App\Util::findGreatestBoundedValue(-1, $data);
         $failed = true;
     } catch (App\Exception $e) {
         $failed = false;
     }
     $this->assertFalse($failed, 'Exception not raised.');
 }