You are here

function Braintree_ConfigurationTest::testProtocol in Commerce Braintree 7

File

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

Class

Braintree_ConfigurationTest

Code

function testProtocol() {
  Braintree_Configuration::environment('development');
  $p = Braintree_Configuration::protocol();
  $this
    ->assertEquals('http', $p);
  Braintree_Configuration::environment('sandbox');
  $p = Braintree_Configuration::protocol();
  $this
    ->assertEquals('https', $p);
  Braintree_Configuration::environment('production');
  $p = Braintree_Configuration::protocol();
  $this
    ->assertEquals('https', $p);
  Braintree_Configuration::reset();
}