mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 14:24:34 -04:00
Transformers for Projects and tasks
This commit is contained in:
parent
3f30965d54
commit
c8408bfa36
@ -839,7 +839,7 @@ class TemplateService
|
||||
{
|
||||
|
||||
return
|
||||
collect($projects)->map(function ($project) ){
|
||||
collect($projects)->map(function ($project){
|
||||
|
||||
return $this->transformProject($project);
|
||||
|
||||
|
@ -18,6 +18,7 @@ use App\Models\Credit;
|
||||
use App\Models\Design;
|
||||
use App\Models\Invoice;
|
||||
use App\Models\Payment;
|
||||
use App\Models\Project;
|
||||
use App\Utils\HtmlEngine;
|
||||
use Tests\MockAccountData;
|
||||
use App\Utils\Traits\MakesDates;
|
||||
@ -180,6 +181,22 @@ class TemplateTest extends TestCase
|
||||
|
||||
}
|
||||
|
||||
public function testProjectDataParse()
|
||||
{
|
||||
$data = [];
|
||||
|
||||
$p = Project::factory()->create([
|
||||
'user_id' => $this->user->id,
|
||||
'company_id' => $this->company->id,
|
||||
'client_id' => $this->client->id,
|
||||
]);
|
||||
|
||||
$ts = new TemplateService();
|
||||
$ts->processData($data['projects'][$p]);
|
||||
|
||||
$this->assertNotNull($ts);
|
||||
}
|
||||
|
||||
public function testNegativeDivAttribute()
|
||||
{
|
||||
$dom = new \DOMDocument();
|
||||
|
Loading…
x
Reference in New Issue
Block a user