BossBey File Manager
PHP:
8.2.30
OS:
Linux
User:
imagivibe
Root
/
home
/
imagivibe
/
public_html
/
app.imagivibe.com
/
vendor
/
hubspot
/
api-client
/
tests
/
Unit
/
Utils
📤 Upload
📝 New File
📁 New Folder
Close
Editing: OAuth2Test.php
<?php namespace Hubspot\Tests\Unit\Utils; use HubSpot\Utils\OAuth2; use PHPUnit\Framework\TestCase; /** * @internal * * @coversNothing */ class OAuth2Test extends TestCase { /** @test */ public function buildAuthorizationUrl() { $authUrl = OAuth2::getAuthUrl( 'clientid', 'http://localhost', ['contacts', 'timeline'], ['scope1', 'scope2'] ); $this->assertSame( 'https://app.hubspot.com/oauth/authorize?client_id=clientid&redirect_uri=http%3A%2F%2Flocalhost&scope=contacts%20timeline&optional_scope=scope1%20scope2', $authUrl ); } /** @test */ public function buildAuthorizationUrlWithEmptyOptionalScope() { $authUrl = OAuth2::getAuthUrl( 'clientid', 'http://localhost', ['contacts', 'timeline'] ); $this->assertSame( 'https://app.hubspot.com/oauth/authorize?client_id=clientid&redirect_uri=http%3A%2F%2Flocalhost&scope=contacts%20timeline', $authUrl ); } }
Save
Cancel