'select * from `customer`', 'db' => $this->getConnection(), ]); $this->assertCount(3, $dataProvider->getModels()); } public function testTotalCount() { $dataProvider = new SqlDataProvider([ 'sql' => 'select * from `customer`', 'db' => $this->getConnection(), ]); $this->assertEquals(3, $dataProvider->getTotalCount()); } public function testTotalCountWithParams() { $dataProvider = new SqlDataProvider([ 'sql' => 'select * from `customer` where id > :minimum', 'params' => [ ':minimum' => -1, ], 'db' => $this->getConnection(), ]); $this->assertEquals(3, $dataProvider->getTotalCount()); } }