provider = new HttpBasicAuthOptionProvider(); } public function testDefault() : void { self::assertEquals( [ 'headers' => [ 'content-type' => MimeType::M_POST, 'Authorization' => 'Basic aWQ6c2VjcmV0', ], 'body' => 'para=test¶2=test2', ], $this->provider->getAccessTokenOptions(RequestMethod::POST, [ 'para' => 'test', 'para2' => 'test2', 'client_id' => 'id', 'client_secret' => 'secret', ] ) ); } public function testInvalidParams() : void { self::assertEquals([], $this->provider->getAccessTokenOptions(RequestMethod::POST, [ 'para' => 'test', 'para2' => 'test2', 'client_id' => 'id', ] ) ); } }