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

UsherTest::testUsher()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 11
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 9
nc 1
nop 0
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