mirror of
https://gitlab.com/openlp/website.git
synced 2024-08-31 02:53:38 +00:00
27 lines
567 B
PHP
27 lines
567 B
PHP
|
<?php
|
||
|
|
||
|
namespace Stripe;
|
||
|
|
||
|
class InvalidRequestErrorTest extends TestCase
|
||
|
{
|
||
|
public function testInvalidObject()
|
||
|
{
|
||
|
self::authorizeFromEnv();
|
||
|
try {
|
||
|
Customer::retrieve('invalid');
|
||
|
} catch (Error\InvalidRequest $e) {
|
||
|
$this->assertSame(404, $e->getHttpStatus());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public function testBadData()
|
||
|
{
|
||
|
self::authorizeFromEnv();
|
||
|
try {
|
||
|
Charge::create();
|
||
|
} catch (Error\InvalidRequest $e) {
|
||
|
$this->assertSame(400, $e->getHttpStatus());
|
||
|
}
|
||
|
}
|
||
|
}
|