oauth()->getAuthorizationCodeUrl('id', 'http://uri'); $this->assertEquals( $expected, $memsourceUrl ); } public function testGetAccessTokenExceptionOnFakeCode() { $api = new Memsource(); $this->expectException(\Exception::class); $token = $api->oauth()->getAccessToken('fakeCode', 'fakeId', 'fakePass', 'http://any'); } public function testGetAccessTokenExceptionOnEmptyCode() { $api = new Memsource(); $this->expectException(\Exception::class); $token = $api->oauth()->getAccessToken('', '', '', ''); } }