Example #1
0
 public function testFoundRows()
 {
     $select = $this->getMock('Sloths\\Db\\Table\\Sql\\Select', ['foundRows']);
     $select->expects($this->once())->method('foundRows')->willReturn(10);
     $collection = new Collection($select, $this->mockModel);
     $this->assertSame(10, $collection->foundRows());
 }
Example #2
0
 /**
  * @return int
  */
 public function count()
 {
     return $this->collection->foundRows();
 }