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()); }
/** * @return int */ public function count() { return $this->collection->foundRows(); }