zkt24-sk1/dompdf/lib/php-font-lib/tests/FontLib/FontTest.php
2024-05-06 12:30:03 +02:00

23 lines
499 B
PHP

<?php
namespace FontLib\Tests;
use FontLib\Font;
class FontTest extends \PHPUnit_Framework_TestCase
{
/**
* @expectedException \Fontlib\Exception\FontNotFoundException
*/
public function testLoadFileNotFound()
{
Font::load('non-existing/font.ttf');
}
public function testLoadTTFFontSuccessfully()
{
$trueTypeFont = Font::load('sample-fonts/IntelClear-Light.ttf');
$this->assertInstanceOf('FontLib\TrueType\File', $trueTypeFont);
}
}