Completed
Push — master ( 49c7a9...f71cbe )
by Dan
02:30
created

UsherTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
lcom 0
cbo 5
dl 0
loc 14
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testUsher() 0 11 1
1
<?php
2
3
namespace SixtyNine\Cloud\Tests\Renderer;
4
5
use Imagine\Gd\Image;
6
use SixtyNine\Cloud\Factory\FontsFactory;
7
use SixtyNine\Cloud\Factory\PlacerFactory;
8
use SixtyNine\Cloud\Usher;
9
10
class UsherTest extends \PHPUnit_Framework_TestCase
11
{
12
    public function testUsher()
13
    {
14
        $factory = FontsFactory::create(__DIR__ . '/fixtures/fonts');
15
        $placer = PlacerFactory::getInstance()->getPlacer('Linear Horizontal', 800, 600, 5);
16
        $usher = new Usher(800, 600, $placer);
17
        $font = $factory->getImagineFont('Arial.ttf', 12);
18
        $place = $usher->getPlace($font->box('foobar', 0));
19
        var_dump($place, $font->box('foobar', 0));
0 ignored issues
show
Security Debugging Code introduced by
var_dump($place, $font->box('foobar', 0)); looks like debug code. Are you sure you do not want to remove it? This might expose sensitive data.
Loading history...
20
        $place = $usher->getPlace($font->box('foobar', 90));
21
        var_dump($place, $font->box('foobar', 90));
22
    }
23
}
24