. */ declare(strict_types=1); namespace Tests\integration\Support; use Carbon\Carbon; use FireflyIII\Support\Navigation; use Tests\integration\TestCase; /** * @internal * * @coversNothing */ final class NavigationCustomEndOfPeriodTest extends TestCase { public function __construct(string $name) { parent::__construct($name); } /** * @preserveGlobalState disabled */ public function testGivenADateAndCustomFrequencyWhenCalculateTheDateThenReturnsTheEndOfMonthSuccessful(): void { $from = Carbon::parse('2023-08-05'); $expected = Carbon::parse('2023-09-04'); $navigation = new Navigation(); $period = $navigation->endOfPeriod($from, 'custom'); self::assertSame($expected->toDateString(), $period->toDateString()); } }