2019-02-16 14:58:14 -06:00
|
|
|
<?php
|
2019-10-05 10:26:10 -05:00
|
|
|
|
2019-02-16 14:58:14 -06:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace ShlinkioTest\Shlink\Rest\Exception;
|
|
|
|
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
use Shlinkio\Shlink\Rest\Exception\VerifyAuthenticationException;
|
|
|
|
|
|
|
|
class VerifyAuthenticationExceptionTest extends TestCase
|
|
|
|
{
|
|
|
|
/** @test */
|
2019-11-26 15:12:52 -06:00
|
|
|
public function createsExpectedExceptionForInvalidApiKey(): void
|
2019-02-16 14:58:14 -06:00
|
|
|
{
|
2019-11-26 15:12:52 -06:00
|
|
|
$e = VerifyAuthenticationException::forInvalidApiKey();
|
2019-02-16 14:58:14 -06:00
|
|
|
|
2020-10-03 17:35:14 -05:00
|
|
|
self::assertEquals('Provided API key does not exist or is invalid.', $e->getMessage());
|
2019-02-16 14:58:14 -06:00
|
|
|
}
|
|
|
|
}
|