InvalidRequestParameterNameExceptionTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 12
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testFromEmptyRequestParameterName() 0 9 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PSR7CsrfTest\Exception;
6
7
use InvalidArgumentException;
8
use PHPUnit\Framework\TestCase;
9
use PSR7Csrf\Exception\ExceptionInterface;
10
use PSR7Csrf\Exception\InvalidRequestParameterNameException;
11
12
/**
13
 * @covers \PSR7Csrf\Exception\InvalidRequestParameterNameException
14
 */
15
final class InvalidRequestParameterNameExceptionTest extends TestCase
16
{
17
    public function testFromEmptyRequestParameterName()
18
    {
19
        $exception = InvalidRequestParameterNameException::fromEmptyRequestParameterName();
20
21
        self::assertInstanceOf(InvalidRequestParameterNameException::class, $exception);
22
        self::assertInstanceOf(InvalidArgumentException::class, $exception);
23
        self::assertInstanceOf(ExceptionInterface::class, $exception);
24
        self::assertSame('The given request parameter must be a non-empty string', $exception->getMessage());
25
    }
26
}
27