You are here

function Braintree_ConfigurationTest::testPortNumber in Commerce Braintree 7

File

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

Class

Braintree_ConfigurationTest

Code

function testPortNumber() {
  Braintree_Configuration::environment('development');
  $pn = Braintree_Configuration::portNumber();
  $this
    ->assertEquals(getenv("GATEWAY_PORT") ? getenv("GATEWAY_PORT") : 3000, $pn);
  Braintree_Configuration::environment('sandbox');
  $pn = Braintree_Configuration::portNumber();
  $this
    ->assertEquals(443, $pn);
  Braintree_Configuration::environment('production');
  $pn = Braintree_Configuration::portNumber();
  $this
    ->assertEquals(443, $pn);
  Braintree_Configuration::reset();
}