mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Fixes for tests
This commit is contained in:
parent
dd5800eac7
commit
fb5b2882d3
@ -40,8 +40,14 @@ class ProfitAndLossReportTest extends TestCase
|
|||||||
$this->makeTestData();
|
$this->makeTestData();
|
||||||
|
|
||||||
$this->withoutExceptionHandling();
|
$this->withoutExceptionHandling();
|
||||||
|
|
||||||
|
$this->buildData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public $company;
|
||||||
|
|
||||||
|
public $payload;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* start_date - Y-m-d
|
* start_date - Y-m-d
|
||||||
@ -61,13 +67,14 @@ class ProfitAndLossReportTest extends TestCase
|
|||||||
include_tax - true tax_included || false - tax_excluded
|
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,
|
'account_id' => $this->account->id,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$payload = [
|
$this->payload = [
|
||||||
'start_date' => '2000-01-01',
|
'start_date' => '2000-01-01',
|
||||||
'end_date' => '2030-01-11',
|
'end_date' => '2030-01-11',
|
||||||
'date_range' => 'custom',
|
'date_range' => 'custom',
|
||||||
@ -75,7 +82,12 @@ class ProfitAndLossReportTest extends TestCase
|
|||||||
'include_tax' => false
|
'include_tax' => false
|
||||||
];
|
];
|
||||||
|
|
||||||
$pl = new ProfitLoss($company, $payload);
|
}
|
||||||
|
|
||||||
|
public function testProfitLossInstance()
|
||||||
|
{
|
||||||
|
|
||||||
|
$pl = new ProfitLoss($this->company, $this->payload);
|
||||||
|
|
||||||
$this->assertInstanceOf(ProfitLoss::class, $pl);
|
$this->assertInstanceOf(ProfitLoss::class, $pl);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user