mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-15 16:57:09 +00:00
Fix phpunit tests
This commit is contained in:
@@ -27,6 +27,7 @@ namespace Tests\unit\Support;
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Support\Navigation;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use Tests\integration\TestCase;
|
||||
|
||||
/**
|
||||
@@ -40,17 +41,17 @@ use Tests\integration\TestCase;
|
||||
*/
|
||||
final class NavigationStartOfPeriodTest extends TestCase
|
||||
{
|
||||
private readonly Navigation $navigation;
|
||||
private Navigation $navigation;
|
||||
|
||||
public function __construct(string $name)
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::__construct($name);
|
||||
parent::setUp();
|
||||
$this->navigation = new Navigation();
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider provideDates
|
||||
*
|
||||
*/
|
||||
#[DataProvider('provideDates')]
|
||||
public function testGivenADateAndFrequencyWhenCalculateTheDateThenReturnsTheExpectedDateSuccessful(string $frequency, Carbon $from, Carbon $expected): void
|
||||
{
|
||||
$period = $this->navigation->startOfPeriod($from, $frequency);
|
||||
@@ -88,8 +89,9 @@ final class NavigationStartOfPeriodTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider provideUnknownFrequencies
|
||||
*
|
||||
*/
|
||||
#[DataProvider('provideUnknownFrequencies')]
|
||||
public function testGivenADateAndUnknownFrequencyWhenCalculateTheDateThenReturnsTheSameDateSuccessful(string $frequency, Carbon $from, Carbon $expected): void
|
||||
{
|
||||
Log::spy();
|
||||
|
Reference in New Issue
Block a user