ImageTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
eloc 9
c 2
b 0
f 1
dl 0
loc 18
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testImage() 0 7 1
A testImage3x() 0 7 1
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