SnappyResponseTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testExceptionMessage() 0 8 2
1
<?php
2
3
namespace Knp\Bundle\SnappyBundle\Tests\Snappy\Response;
4
5
use Knp\Bundle\SnappyBundle\Snappy\Response\SnappyResponse;
6
use PHPUnit\Framework\TestCase;
7
8
class SnappyResponseTest extends TestCase
9
{
10
    public function testExceptionMessage()
11
    {
12
        try {
13
            new SnappyResponse('', 'test.jpg', 'image/jpg', 'foo');
14
        } catch (\InvalidArgumentException $e) {
15
            $this->assertSame('Expected one of the following directives: "inline", "attachment", but "foo" given.', $e->getMessage());
16
        }
17
    }
18
}
19