mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Set timezone when testing date ranges
This commit is contained in:
parent
3ce0a601ff
commit
df8b383b31
@ -308,13 +308,15 @@ class RecurringInvoiceTest extends TestCase
|
|||||||
public function testRecurringDatePassesToInvoice()
|
public function testRecurringDatePassesToInvoice()
|
||||||
{
|
{
|
||||||
$noteText = "Hello this is for :MONTH_AFTER";
|
$noteText = "Hello this is for :MONTH_AFTER";
|
||||||
$recurringDate = \Carbon\Carbon::now()->subDays(10);
|
$recurringDate = \Carbon\Carbon::now()->timezone($this->client->timezone()->name)->subDays(10);
|
||||||
|
|
||||||
$item = InvoiceItemFactory::create();
|
$item = InvoiceItemFactory::create();
|
||||||
$item->cost = 10;
|
$item->cost = 10;
|
||||||
$item->notes = $noteText;
|
$item->notes = $noteText;
|
||||||
|
|
||||||
$recurring_invoice = InvoiceToRecurringInvoiceFactory::create($this->invoice);
|
$recurring_invoice = InvoiceToRecurringInvoiceFactory::create($this->invoice);
|
||||||
|
|
||||||
|
|
||||||
$recurring_invoice->user_id = $this->user->id;
|
$recurring_invoice->user_id = $this->user->id;
|
||||||
$recurring_invoice->next_send_date = $recurringDate;
|
$recurring_invoice->next_send_date = $recurringDate;
|
||||||
$recurring_invoice->status_id = RecurringInvoice::STATUS_ACTIVE;
|
$recurring_invoice->status_id = RecurringInvoice::STATUS_ACTIVE;
|
||||||
|
Loading…
Reference in New Issue
Block a user