Example #1
0
<?php

/**
 * Basecamp API PHPUnit Tests Bootstrapper
 */
// Load composer autoloader.
require_once __DIR__ . '/../vendor/autoload.php';
// Load the local configuration file.
$config = (include __DIR__ . '/config.php');
// Set the configuration.
\Zawntech\BasecampAPI\Config::set($config);
// Load oauth token from file.
$json = file_get_contents(__DIR__ . '/basecamp-oauth-redirect/data.json');
$json = json_decode($json);
\Zawntech\BasecampAPI\Auth\Authorizer::injectOAuthToken($json);
require_once __DIR__ . '/TestCase.php';
 public function testCanInstantiateWithDefaultAuthType()
 {
     $auth = new Authorizer();
     $this->assertEquals($this->config->authenticationType, $auth->getAuthModule()->getType());
 }
Example #3
0
 public function testCanGetRedirectUrl()
 {
     $this->auth->getAuthModule()->getOAuthRedirectUrl();
 }