setType($type); $this->database->count("account", [ "gender" => "female" ]); $this->assertQuery( <<database->queryString ); } /** * @covers ::max() * @covers ::aggregate() * @covers ::selectContext() * @dataProvider typesProvider */ public function testMax($type) { $this->setType($type); $this->database->max("account", "age"); $this->assertQuery( <<database->queryString ); } /** * @covers ::min() * @covers ::aggregate() * @covers ::selectContext() * @dataProvider typesProvider */ public function testMin($type) { $this->setType($type); $this->database->min("account", "age"); $this->assertQuery( <<database->queryString ); } /** * @covers ::avg() * @covers ::aggregate() * @covers ::selectContext() * @dataProvider typesProvider */ public function testAvg($type) { $this->setType($type); $this->database->avg("account", "age"); $this->assertQuery( <<database->queryString ); } /** * @covers ::sum() * @covers ::aggregate() * @covers ::selectContext() * @dataProvider typesProvider */ public function testSum($type) { $this->setType($type); $this->database->sum("account", "money"); $this->assertQuery( <<database->queryString ); } }