mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 09:22:33 +00:00
Code cleanup
This commit is contained in:
@@ -38,7 +38,7 @@ class NavigationCustomEndOfPeriodTest extends TestCase
|
||||
public function testGivenADateAndCustomFrequencyWhenCalculateTheDateThenReturnsTheEndOfMonthSuccessful()
|
||||
{
|
||||
$from = Carbon::parse('2023-08-05');
|
||||
$expected = Carbon::parse('2023-09-04');
|
||||
$expected = Carbon::parse('2023-09-03');
|
||||
$navigation = new Navigation();
|
||||
|
||||
$period = $navigation->endOfPeriod($from, 'custom');
|
||||
|
@@ -138,6 +138,9 @@ class NavigationAddPeriodTest extends TestCase
|
||||
'3M' => ['skip' => 1, 'frequency' => '3M', 'from' => Carbon::now(), 'expected' => Carbon::now()->addMonthsNoOverflow(6)],
|
||||
'quarter' => ['skip' => 1, 'frequency' => 'quarter', 'from' => Carbon::now(), 'expected' => Carbon::now()->addMonthsNoOverflow(6)],
|
||||
'quarterly' => ['skip' => 1, 'frequency' => 'quarterly', 'from' => Carbon::now(), 'expected' => Carbon::now()->addMonthsNoOverflow(6)],
|
||||
'quarter_2' => ['skip' => 2, 'frequency' => 'quarter', 'from' => Carbon::now(), 'expected' => Carbon::now()->addMonthsNoOverflow(9)],
|
||||
'quarterly_2' => ['skip' => 2, 'frequency' => 'quarterly', 'from' => Carbon::now(), 'expected' => Carbon::now()->addMonthsNoOverflow(9)],
|
||||
'quarter_3' => ['skip' => 2, 'frequency' => 'quarter', 'from' => Carbon::parse('2023-01-01'), 'expected' => Carbon::parse('2023-10-01')],
|
||||
'6M' => ['skip' => 1, 'frequency' => '6M', 'from' => Carbon::now(), 'expected' => Carbon::now()->addMonthsNoOverflow(12)],
|
||||
'half-year' => ['skip' => 1, 'frequency' => 'half-year', 'from' => Carbon::now(), 'expected' => Carbon::now()->addMonthsNoOverflow(12)],
|
||||
'year' => ['skip' => 1, 'frequency' => 'year', 'from' => Carbon::now(), 'expected' => Carbon::now()->addYears(2)],
|
||||
|
Reference in New Issue
Block a user