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

SnappyResponseTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
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;
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