public function testGet_auth_url() { $this->object->set_parameters($this->parameters); $expected_url = "one_auth_endpoint?response_type=code&client_id=client_id&redirect_uri=redirect_uri&scope=super_scope"; $this->assertEquals($expected_url, $this->object->get_auth_url()); $more_params = ["test" => "test"]; $this->assertEquals($expected_url . "&test=test", $this->object->get_auth_url($more_params)); $more_params = ["response_type" => "test"]; $this->assertNotEquals($expected_url, $this->object->get_auth_url($more_params)); }
/** * Implements OAuth2.0 youtube specifications * @param array $supp_parameters * @return string */ public function get_auth_url(array $supp_parameters = []) { $supp_parameters = array_merge($supp_parameters, ['access_type' => 'offline', 'approval_prompt' => 'force']); return parent::get_auth_url($supp_parameters); }