class Braintree_TransparentRedirectTest in Commerce Braintree 7
Same name in this branch
- 7 braintree_php/tests/unit/TransparentRedirectTest.php \Braintree_TransparentRedirectTest
- 7 braintree_php/tests/integration/TransparentRedirectTest.php \Braintree_TransparentRedirectTest
Hierarchy
- class \Braintree_TransparentRedirectTest extends \PHPUnit_Framework_TestCase
Expanded class hierarchy of Braintree_TransparentRedirectTest
File
- braintree_php/
tests/ unit/ TransparentRedirectTest.php, line 4
View source
class Braintree_TransparentRedirectTest extends PHPUnit_Framework_TestCase {
function testData_specifiesArgSeparatorAsAmpersand() {
$originalSeparator = ini_get("arg_separator.output");
ini_set("arg_separator.output", "&");
$trData = Braintree_TransparentRedirect::createCustomerData(array(
'redirectUrl' => 'http://www.example.com',
));
ini_set("arg_separator.output", $originalSeparator);
$this
->assertFalse(strpos($trData, "&"));
}
function testData_doesNotClobberDefaultTimezone() {
$originalZone = date_default_timezone_get();
date_default_timezone_set('Europe/London');
$trData = Braintree_TransparentRedirect::createCustomerData(array(
'redirectUrl' => 'http://www.example.com',
));
$zoneAfterCall = date_default_timezone_get();
date_default_timezone_set($originalZone);
$this
->assertEquals('Europe/London', $zoneAfterCall);
}
}