You are here

function Braintree_TransparentRedirectTest::testRedirectUrl in Commerce Braintree 7

File

braintree_php/tests/integration/TransparentRedirectTest.php, line 6

Class

Braintree_TransparentRedirectTest

Code

function testRedirectUrl() {
  Braintree_TestHelper::suppressDeprecationWarnings();
  $trData = Braintree_TransparentRedirect::createCustomerData(array(
    "redirectUrl" => "http://www.example.com?foo=bar",
  ));
  $queryString = Braintree_TestHelper::submitTrRequest(Braintree_Configuration::merchantUrl() . '/test/maintenance', array(), $trData);
  $this
    ->setExpectedException('Braintree_Exception_DownForMaintenance');
  Braintree_Customer::createFromTransparentRedirect($queryString);
}