SnappyResponseTest::testExceptionMessage()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
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