grant = new AuthorizationCode(); } /** * @covers phpOMS\Auth\OAuth2\Grant\AuthorizationCode * @group framework */ public function testDefault() : void { self::assertEquals('authorization_code', $this->grant->__toString()); self::assertEquals( [ 'code' => 'value', 'option' => '2', 'test' => 'value2', ], $this->grant->prepareRequestParamters( [ 'code' => 'value', ], [ 'option' => '2', 'test' => 'value2', ] ) ); } /** * @covers phpOMS\Auth\OAuth2\Grant\AuthorizationCode * @group framework */ public function testMissingDefaultOption() : void { $this->expectException(\Exception::class); $this->grant->prepareRequestParamters( [ 'test' => 'value', ], [ 'option' => '2', 'test' => 'value2', ] ); } }