Skip to content

Commit

Permalink
Adding STAGE env (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
votemike authored Jul 24, 2018
1 parent 0b708cd commit adf2f76
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/OrbitClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class OrbitClient

const ORBIT_WEBSERVICE_URL = 'https://navigation.{env}api.bbci.co.uk/api';

const SUPPORTED_ENVIRONMENTS = ['int', 'test', 'live'];
const SUPPORTED_ENVIRONMENTS = ['int', 'test', 'stage', 'live'];

/** @var Client */
private $client;
Expand Down
9 changes: 5 additions & 4 deletions tests/OrbitClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use BBC\BrandingClient\Orbit;
use BBC\BrandingClient\OrbitClient;
use BBC\BrandingClient\OrbitException;
use GuzzleHttp\Client;
use Psr\Cache\CacheItemInterface;
use Psr\Cache\CacheItemPoolInterface;
Expand Down Expand Up @@ -55,12 +56,12 @@ public function testConstructorCustomOptions()
$this->assertEquals($options, $orbitClient->getOptions());
}

/**
* @expectedException BBC\BrandingClient\OrbitException
* @expectedExceptionMessage Invalid environment supplied, expected one of "int, test, live" but got "garbage"
*/
public function testInvalidEnvThrowsException()
{
$this->expectException(OrbitException::class);
$this->expectExceptionMessage(
'Invalid environment supplied, expected one of "int, test, stage, live" but got "garbage"'
);
new OrbitClient(
$this->getClient(),
$this->cache,
Expand Down

0 comments on commit adf2f76

Please sign in to comment.