setType($type); $this->database->rand("account", [ "user_name" ]); $this->assertQuery([ 'default' => << << <<database->queryString); } /** * @covers ::rand() * @dataProvider typesProvider */ public function testWhereRand($type) { $this->setType($type); $this->database->rand("account", [ "user_name" ], [ "location" => "Tokyo" ]); $this->assertQuery([ 'default' => << << <<database->queryString); } /** * @covers ::rand() * @dataProvider typesProvider */ public function testWhereWithJoinRand($type) { $this->setType($type); $this->database->rand("account", [ "[>]album" => "user_id" ], [ "account.user_name" ], [ "album.location" => "Tokyo" ]); $this->assertQuery([ 'default' => << << <<database->queryString); } /** * @covers ::rand() * @dataProvider typesProvider */ public function testWithJoinRand($type) { $this->setType($type); $this->database->rand("account", [ "[>]album" => "user_id" ], [ "account.user_name" ]); $this->assertQuery([ 'default' => << << <<database->queryString); } }