mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Final fixes.
This commit is contained in:
@@ -24,6 +24,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace Tests\unit\Support;
|
||||
|
||||
use Override;
|
||||
use Iterator;
|
||||
use FireflyIII\Support\Navigation;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use Tests\integration\TestCase;
|
||||
@@ -41,6 +43,7 @@ final class NavigationPreferredCarbonFormatByPeriodTest extends TestCase
|
||||
{
|
||||
private Navigation $navigation;
|
||||
|
||||
#[Override]
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
@@ -54,15 +57,18 @@ final class NavigationPreferredCarbonFormatByPeriodTest extends TestCase
|
||||
self::assertSame($expected, $formatPeriod);
|
||||
}
|
||||
|
||||
public static function providePeriods(): iterable
|
||||
public static function providePeriods(): Iterator
|
||||
{
|
||||
return [
|
||||
'unknown' => ['period' => '1day', 'expected' => 'Y-m-d'],
|
||||
'week' => ['period' => '1W', 'expected' => '\WW,Y'],
|
||||
'month' => ['period' => '1M', 'expected' => 'Y-m'],
|
||||
'quarterly' => ['period' => '3M', 'expected' => '\QQ,Y'],
|
||||
'half-yearly' => ['period' => '6M', 'expected' => '\QQ,Y'],
|
||||
'yearly' => ['period' => '1Y', 'expected' => 'Y'],
|
||||
];
|
||||
yield 'unknown' => ['1day', 'Y-m-d'];
|
||||
|
||||
yield 'week' => ['1W', '\WW,Y'];
|
||||
|
||||
yield 'month' => ['1M', 'Y-m'];
|
||||
|
||||
yield 'quarterly' => ['3M', '\QQ,Y'];
|
||||
|
||||
yield 'half-yearly' => ['6M', '\QQ,Y'];
|
||||
|
||||
yield 'yearly' => ['1Y', 'Y'];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user