Skip to content

Commit 18eb33a

Browse files
committed
Add test to ensure factory is build TrueType File.
1 parent dd4ddbe commit 18eb33a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/FontLib/FontTest.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
namespace FontLib\Tests;
4+
5+
use FontLib\Font;
6+
7+
class FontTest extends \PHPUnit_Framework_TestCase
8+
{
9+
/**
10+
* @expectedException \Fontlib\Exception\FontNotFoundException
11+
*/
12+
public function testLoadFileNotFound()
13+
{
14+
Font::load('non-existing/font.ttf');
15+
}
16+
17+
public function testLoadTTFFontSuccessfully()
18+
{
19+
$trueTypeFont = Font::load('sample-fonts/IntelClear-Light.ttf');
20+
21+
$this->assertInstanceOf('FontLib\TrueType\File', $trueTypeFont);
22+
}
23+
}

0 commit comments

Comments
 (0)