shlink/module/Rest/test/Exception/VerifyAuthenticationExceptionTest.php

20 lines
499 B
PHP
Raw Normal View History

2019-02-16 21:58:14 +01:00
<?php
2019-10-05 17:26:10 +02:00
2019-02-16 21:58:14 +01: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 22:12:52 +01:00
public function createsExpectedExceptionForInvalidApiKey(): void
2019-02-16 21:58:14 +01:00
{
2019-11-26 22:12:52 +01:00
$e = VerifyAuthenticationException::forInvalidApiKey();
2019-02-16 21:58:14 +01:00
2020-10-04 00:35:14 +02:00
self::assertEquals('Provided API key does not exist or is invalid.', $e->getMessage());
2019-02-16 21:58:14 +01:00
}
}