Passed
Push — master ( 02d42a...eb71ce )
by Albin
59s
created

SnappyResponseTest::testExceptionMessage()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 5
nc 2
nop 0
1
<?php
2
3
namespace Knp\Bundle\SnappyBundle\Tests\Snappy;
4
5
use Knp\Bundle\SnappyBundle\Snappy\Response\SnappyResponse;
6
7
class SnappyResponseTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function testExceptionMessage()
10
    {
11
        try {
12
            new SnappyResponse('', 'test.jpg', 'image/jpg', 'foo');
13
        } catch (\InvalidArgumentException $e) {
14
            $this->assertSame('Expected one of the following directives: "inline", "attachment", but "foo" given.', $e->getMessage());
15
        }
16
    }
17
}
18