Файл: Main Website Files/assets/libraries/stripe-php-2.2.0/tests/ErrorTest.php
Строк: 9
<?php
namespace Stripe;
class ErrorTest extends TestCase
{
public function testCreation()
{
try {
throw new ErrorApi(
"hello",
500,
"{'foo':'bar'}",
array('foo' => 'bar')
);
$this->fail("Did not raise error");
} catch (ErrorApi $e) {
$this->assertSame("hello", $e->getMessage());
$this->assertSame(500, $e->getHttpStatus());
$this->assertSame("{'foo':'bar'}", $e->getHttpBody());
$this->assertSame(array('foo' => 'bar'), $e->getJsonBody());
}
}
}