Passed
Pull Request — master (#103)
by Razvan
15:39 queued 12:47
created

ImageTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 20
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