コード例 #1
0
ファイル: PaginatorTest.php プロジェクト: rajanlamic/IntTest
 /**
  * @group ZF-8656
  */
 public function testNormalizesPageNumberWhenGivenAFloat()
 {
     $this->assertEquals(1, $this->paginator->normalizePageNumber(0.5));
     $this->assertEquals(1, $this->paginator->normalizePageNumber(1.99));
     $this->assertEquals(2, $this->paginator->normalizePageNumber(2.3));
     $this->assertEquals(5, $this->paginator->normalizePageNumber(5.1));
     $this->assertEquals(10, $this->paginator->normalizePageNumber(10.06));
     $this->assertEquals(11, $this->paginator->normalizePageNumber(11.5));
     $this->assertEquals(11, $this->paginator->normalizePageNumber(12.7889));
 }