You are here

function Braintree_ConfigurationTest::testServerName in Commerce Braintree 7

File

braintree_php/tests/unit/ConfigurationTest.php, line 113

Class

Braintree_ConfigurationTest

Code

function testServerName() {
  Braintree_Configuration::environment('development');
  $sn = Braintree_Configuration::serverName();
  $this
    ->assertEquals('localhost', $sn);
  Braintree_Configuration::environment('sandbox');
  $sn = Braintree_Configuration::serverName();
  $this
    ->assertEquals('sandbox.braintreegateway.com', $sn);
  Braintree_Configuration::environment('production');
  $sn = Braintree_Configuration::serverName();
  $this
    ->assertEquals('www.braintreegateway.com', $sn);
  Braintree_Configuration::reset();
}