1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-22 01:11:34 +02:00
invoiceninja/tests/Unit/HelpersTest.php

42 lines
919 B
PHP
Raw Normal View History

2021-10-27 14:51:43 +02:00
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2021. Invoice Ninja LLC (https://invoiceninja.com)
*
2022-06-08 06:25:44 +02:00
* @license https://www.elastic.co/licensing/elastic-license
2021-10-27 14:51:43 +02:00
*/
namespace Tests\Unit;
use App\Utils\Helpers;
use PHPUnit\Framework\TestCase;
class HelpersTest extends TestCase
{
public function testFontsReturnFormat(): void
{
$font = Helpers::resolveFont();
$this->assertArrayHasKey('name', $font);
$this->assertArrayHasKey('url', $font);
}
public function testResolvingFont(): void
{
$font = Helpers::resolveFont('Inter');
$this->assertEquals('Inter', $font['name']);
}
public function testDefaultFontIsArial(): void
{
$font = Helpers::resolveFont();
$this->assertEquals('Arial', $font['name']);
}
}