mirror of
https://gitlab.com/openlp/website.git
synced 2024-12-22 21:12:50 +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());
|
||
|
}
|
||
|
}
|
||
|
}
|