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

21 lines
533 B
PHP
Raw Normal View History

2019-02-16 23:58:14 +03:00
<?php
2019-10-05 18:26:10 +03:00
2019-02-16 23:58:14 +03:00
declare(strict_types=1);
namespace ShlinkioTest\Shlink\Rest\Exception;
use PHPUnit\Framework\Attributes\Test;
2019-02-16 23:58:14 +03:00
use PHPUnit\Framework\TestCase;
use Shlinkio\Shlink\Rest\Exception\VerifyAuthenticationException;
class VerifyAuthenticationExceptionTest extends TestCase
{
#[Test]
2019-11-27 00:12:52 +03:00
public function createsExpectedExceptionForInvalidApiKey(): void
2019-02-16 23:58:14 +03:00
{
2019-11-27 00:12:52 +03:00
$e = VerifyAuthenticationException::forInvalidApiKey();
2019-02-16 23:58:14 +03:00
2020-10-04 01:35:14 +03:00
self::assertEquals('Provided API key does not exist or is invalid.', $e->getMessage());
2019-02-16 23:58:14 +03:00
}
}