new invoice template variables for budgets (#3005)
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
namespace App\Tests\Invoice\Hydrator;
|
||||
|
||||
use App\Activity\ActivityStatisticService;
|
||||
use App\Invoice\Hydrator\InvoiceModelActivityHydrator;
|
||||
use App\Tests\Invoice\Renderer\RendererTestTrait;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@@ -24,7 +25,7 @@ class InvoiceModelActivityHydratorTest extends TestCase
|
||||
{
|
||||
$model = $this->getInvoiceModel();
|
||||
|
||||
$sut = new InvoiceModelActivityHydrator();
|
||||
$sut = new InvoiceModelActivityHydrator($this->createMock(ActivityStatisticService::class));
|
||||
|
||||
$result = $sut->hydrate($model);
|
||||
$this->assertModelStructure($result);
|
||||
@@ -41,10 +42,18 @@ class InvoiceModelActivityHydratorTest extends TestCase
|
||||
'activity.name',
|
||||
'activity.comment',
|
||||
'activity.meta.foo-activity',
|
||||
'activity.budget_open',
|
||||
'activity.budget_open_plain',
|
||||
'activity.time_budget_open',
|
||||
'activity.time_budget_open_plain',
|
||||
'activity.1.id',
|
||||
'activity.1.name',
|
||||
'activity.1.comment',
|
||||
'activity.1.meta.foo-activity',
|
||||
'activity.1.budget_open',
|
||||
'activity.1.budget_open_plain',
|
||||
'activity.1.time_budget_open',
|
||||
'activity.1.time_budget_open_plain',
|
||||
];
|
||||
|
||||
$givenKeys = array_keys($model);
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
namespace App\Tests\Invoice\Hydrator;
|
||||
|
||||
use App\Customer\CustomerStatisticService;
|
||||
use App\Invoice\Hydrator\InvoiceModelCustomerHydrator;
|
||||
use App\Tests\Invoice\Renderer\RendererTestTrait;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
@@ -24,7 +25,7 @@ class InvoiceModelCustomerHydratorTest extends TestCase
|
||||
{
|
||||
$model = $this->getInvoiceModel();
|
||||
|
||||
$sut = new InvoiceModelCustomerHydrator();
|
||||
$sut = new InvoiceModelCustomerHydrator($this->createMock(CustomerStatisticService::class));
|
||||
|
||||
$result = $sut->hydrate($model);
|
||||
$this->assertModelStructure($result);
|
||||
@@ -52,6 +53,10 @@ class InvoiceModelCustomerHydratorTest extends TestCase
|
||||
'customer.phone',
|
||||
'customer.mobile',
|
||||
'customer.meta.foo-customer',
|
||||
'customer.budget_open',
|
||||
'customer.budget_open_plain',
|
||||
'customer.time_budget_open',
|
||||
'customer.time_budget_open_plain',
|
||||
];
|
||||
|
||||
$givenKeys = array_keys($model);
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
namespace App\Tests\Invoice\Hydrator;
|
||||
|
||||
use App\Invoice\Hydrator\InvoiceModelProjectHydrator;
|
||||
use App\Project\ProjectStatisticService;
|
||||
use App\Tests\Invoice\Renderer\RendererTestTrait;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
@@ -24,7 +25,7 @@ class InvoiceModelProjectHydratorTest extends TestCase
|
||||
{
|
||||
$model = $this->getInvoiceModel();
|
||||
|
||||
$sut = new InvoiceModelProjectHydrator();
|
||||
$sut = new InvoiceModelProjectHydrator($this->createMock(ProjectStatisticService::class));
|
||||
|
||||
$result = $sut->hydrate($model);
|
||||
$this->assertModelStructure($result);
|
||||
@@ -51,6 +52,10 @@ class InvoiceModelProjectHydratorTest extends TestCase
|
||||
'project.budget_time',
|
||||
'project.budget_time_decimal',
|
||||
'project.budget_time_minutes',
|
||||
'project.budget_open',
|
||||
'project.budget_open_plain',
|
||||
'project.time_budget_open',
|
||||
'project.time_budget_open_plain',
|
||||
'project.1.id',
|
||||
'project.1.name',
|
||||
'project.1.comment',
|
||||
@@ -65,6 +70,10 @@ class InvoiceModelProjectHydratorTest extends TestCase
|
||||
'project.1.budget_time',
|
||||
'project.1.budget_time_decimal',
|
||||
'project.1.budget_time_minutes',
|
||||
'project.1.budget_open',
|
||||
'project.1.budget_open_plain',
|
||||
'project.1.time_budget_open',
|
||||
'project.1.time_budget_open_plain',
|
||||
];
|
||||
|
||||
$givenKeys = array_keys($model);
|
||||
|
||||
Reference in New Issue
Block a user