Completed
Pull Request — master (#70)
by
unknown
03:57
created

ImageTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 0
cbo 2
dl 0
loc 20
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testImage() 0 8 1
A testImage3x() 0 8 1
1
<?php
2
3
namespace Passbook\Tests\Pass;
4
5
use Passbook\Pass\Image;
6
7
class ImageTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function testImage()
10
    {
11
        $image = new Image(__DIR__.'/../../../img/icon.png', 'thumbnail');
12
        $image->setDensity(2);
13
14
        $this->assertEquals($image->getContext(), 'thumbnail');
15
        $this->assertEquals($image->getDensity(), 2);
16
    }
17
18
    public function testImage3x()
19
    {
20
        $image = new Image(__DIR__.'/../../../img/icon.png', 'thumbnail');
21
        $image->setDensity(3);
22
23
        $this->assertEquals($image->getContext(), 'thumbnail');
24
        $this->assertEquals($image->getDensity(), 3);
25
    }
26
}
27