Passed
Push — maintenance-work ( b6a05d...a58b3b )
by Razvan
12:47
created

ImageTest::testImage3x()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 7
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Passbook\Tests\Pass;
4
5
use Passbook\Pass\Image;
6
use PHPUnit\Framework\TestCase;
7
8
class ImageTest extends TestCase
9
{
10
    public function testImage()
11
    {
12
        $image = new Image(__DIR__.'/../../../img/icon.png', 'thumbnail');
13
        $image->setDensity(2);
14
15
        $this->assertEquals($image->getContext(), 'thumbnail');
16
        $this->assertEquals($image->getDensity(), 2);
17
    }
18
19
    public function testImage3x()
20
    {
21
        $image = new Image(__DIR__.'/../../../img/icon.png', 'thumbnail');
22
        $image->setDensity(3);
23
24
        $this->assertEquals('thumbnail', $image->getContext());
25
        $this->assertEquals(3, $image->getDensity());
26
    }
27
}
28