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

20 lines
500 B
PHP
Raw Normal View History

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
2019-11-26 15:12:52 -06:00
$this->assertEquals('Provided API key does not exist or is invalid.', $e->getMessage());
2019-02-16 14:58:14 -06:00
}
}