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