invoices: choose language and duration format (#1438)
This commit is contained in:
30
tests/Entity/InvoiceDocumentTest.php
Normal file
30
tests/Entity/InvoiceDocumentTest.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\Entity;
|
||||
|
||||
use App\Entity\InvoiceDocument;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \App\Entity\InvoiceDocument
|
||||
*/
|
||||
class InvoiceDocumentTest extends TestCase
|
||||
{
|
||||
public function testDefaultValues()
|
||||
{
|
||||
$dir = realpath(__DIR__ . '/../../templates/invoice/renderer');
|
||||
$sut = new InvoiceDocument(new \SplFileInfo($dir . '/default.html.twig'));
|
||||
|
||||
self::assertEquals('twig', $sut->getFileExtension());
|
||||
self::assertStringContainsString('templates/invoice/renderer/default.html.twig', $sut->getFilename());
|
||||
self::assertEquals('default', $sut->getId());
|
||||
self::assertEquals('default.html.twig', $sut->getName());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user