1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 00:41:34 +02:00

Fixes for tests

This commit is contained in:
David Bomba 2022-05-12 11:10:47 +10:00
parent dd5800eac7
commit fb5b2882d3

View File

@ -40,8 +40,14 @@ class ProfitAndLossReportTest extends TestCase
$this->makeTestData();
$this->withoutExceptionHandling();
$this->buildData();
}
public $company;
public $payload;
/**
*
* start_date - Y-m-d
@ -61,13 +67,14 @@ class ProfitAndLossReportTest extends TestCase
include_tax - true tax_included || false - tax_excluded
*/
public function testProfitLossInstance()
private function buildData()
{
$company = Company::factory()->create([
$this->company = Company::factory()->create([
'account_id' => $this->account->id,
]);
$payload = [
$this->payload = [
'start_date' => '2000-01-01',
'end_date' => '2030-01-11',
'date_range' => 'custom',
@ -75,7 +82,12 @@ class ProfitAndLossReportTest extends TestCase
'include_tax' => false
];
$pl = new ProfitLoss($company, $payload);
}
public function testProfitLossInstance()
{
$pl = new ProfitLoss($this->company, $this->payload);
$this->assertInstanceOf(ProfitLoss::class, $pl);