include project name in invoice name (#1672)

This commit is contained in:
Kevin Papst
2020-04-29 18:51:33 +02:00
committed by GitHub
parent ad2698dae2
commit 35f864256f
2 changed files with 25 additions and 0 deletions

View File

@@ -11,9 +11,11 @@ namespace App\Tests\Invoice;
use App\Entity\Customer;
use App\Entity\InvoiceTemplate;
use App\Entity\Project;
use App\Invoice\InvoiceFilename;
use App\Invoice\InvoiceModel;
use App\Invoice\NumberGenerator\DateNumberGenerator;
use App\Repository\Query\InvoiceQuery;
use PHPUnit\Framework\TestCase;
/**
@@ -57,5 +59,16 @@ class InvoiceFilenameTest extends TestCase
$customer->setCompany('\"#+ß.!$%&/()=?\\n=/*-+´_<>@' . "\n");
$sut = new InvoiceFilename($model);
self::assertEquals($datePrefix . '-ss_n', $sut->getFilename());
$project = new Project();
$project->setName('Demo ProjecT1');
$query = new InvoiceQuery();
$query->addProject($project);
$model->setQuery($query);
$customer->setCompany('\"#+ß.!$%&/()=?\\n=/*-+´_<>@' . "\n");
$sut = new InvoiceFilename($model);
self::assertEquals($datePrefix . '-ss_n-demo_projec_t1', $sut->getFilename());
}
}