zkt24-sk1/dompdf/lib/php-font-lib/tests/FontLib/FontTest.php

23 lines
499 B
PHP
Raw Permalink Normal View History

2024-05-06 10:30:03 +00:00
<?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);
}
}