| Zeile 22... |
Zeile 22... |
| 22 |
|
22 |
|
| 23 |
/** @test */
|
23 |
/** @test */
|
| 24 |
public function it_throws_exception_if_invalid_credentials_are_provided()
|
24 |
public function it_throws_exception_if_invalid_credentials_are_provided()
|
| 25 |
{
|
25 |
{
|
| 26 |
$this->expectException(\RuntimeException::class);
|
26 |
$this->expectException(\RuntimeException::class);
|
| Zeile 27... |
Zeile 27... |
| 27 |
$this->expectErrorMessage('Invalid configuration provided. Please provide valid configuration for PayPal API. You can also refer to the documentation at https://srmklive.github.io/laravel-paypal/docs.html to setup correct configuration.');
|
27 |
$this->expectExceptionMessage('Invalid configuration provided. Please provide valid configuration for PayPal API. You can also refer to the documentation at https://srmklive.github.io/laravel-paypal/docs.html to setup correct configuration.');
|
| 28 |
|
28 |
|
| Zeile 29... |
Zeile 29... |
| 29 |
$this->client = new PayPalClient([]);
|
29 |
$this->client = new PayPalClient([]);
|
| 30 |
}
|
30 |
}
|
| 31 |
|
31 |
|
| 32 |
/** @test */
|
32 |
/** @test */
|
| 33 |
public function it_throws_exception_if_invalid_mode_is_provided()
|
33 |
public function it_throws_exception_if_invalid_mode_is_provided()
|
| Zeile 34... |
Zeile 34... |
| 34 |
{
|
34 |
{
|
| 35 |
$this->expectException(\RuntimeException::class);
|
35 |
$this->expectException(\RuntimeException::class);
|
| Zeile 36... |
Zeile 36... |
| 36 |
$this->expectErrorMessage('Invalid configuration provided. Please provide valid configuration for PayPal API. You can also refer to the documentation at https://srmklive.github.io/laravel-paypal/docs.html to setup correct configuration.');
|
36 |
$this->expectExceptionMessage('Invalid configuration provided. Please provide valid configuration for PayPal API. You can also refer to the documentation at https://srmklive.github.io/laravel-paypal/docs.html to setup correct configuration.');
|
| Zeile 43... |
Zeile 43... |
| 43 |
|
43 |
|
| 44 |
/** @test */
|
44 |
/** @test */
|
| 45 |
public function it_throws_exception_if_empty_credentials_are_provided()
|
45 |
public function it_throws_exception_if_empty_credentials_are_provided()
|
| 46 |
{
|
46 |
{
|
| 47 |
$this->expectException(\RuntimeException::class);
|
47 |
$this->expectException(\RuntimeException::class);
|
| Zeile 48... |
Zeile 48... |
| 48 |
$this->expectErrorMessage('Invalid configuration provided. Please provide valid configuration for PayPal API. You can also refer to the documentation at https://srmklive.github.io/laravel-paypal/docs.html to setup correct configuration.');
|
48 |
$this->expectExceptionMessage('Invalid configuration provided. Please provide valid configuration for PayPal API. You can also refer to the documentation at https://srmklive.github.io/laravel-paypal/docs.html to setup correct configuration.');
|
| 49 |
|
49 |
|
| Zeile 50... |
Zeile 50... |
| 50 |
$credentials = $this->getApiCredentials();
|
50 |
$credentials = $this->getApiCredentials();
|
| Zeile 57... |
Zeile 57... |
| 57 |
public function it_throws_exception_if_credentials_items_are_not_provided()
|
57 |
public function it_throws_exception_if_credentials_items_are_not_provided()
|
| 58 |
{
|
58 |
{
|
| 59 |
$item = 'client_id';
|
59 |
$item = 'client_id';
|
| Zeile 60... |
Zeile 60... |
| 60 |
|
60 |
|
| 61 |
$this->expectException(\RuntimeException::class);
|
61 |
$this->expectException(\RuntimeException::class);
|
| Zeile 62... |
Zeile 62... |
| 62 |
$this->expectErrorMessage("{$item} missing from the provided configuration. Please add your application {$item}.");
|
62 |
$this->expectExceptionMessage("{$item} missing from the provided configuration. Please add your application {$item}.");
|
| 63 |
|
63 |
|
| Zeile 64... |
Zeile 64... |
| 64 |
$credentials = $this->getApiCredentials();
|
64 |
$credentials = $this->getApiCredentials();
|