mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Fix phpunit tests
This commit is contained in:
@@ -27,6 +27,7 @@ namespace Tests\unit\Support\Calendar;
|
||||
use FireflyIII\Exceptions\IntervalException;
|
||||
use FireflyIII\Support\Calendar\Calculator;
|
||||
use FireflyIII\Support\Calendar\Periodicity;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use Tests\integration\TestCase;
|
||||
use Tests\unit\Support\Calendar\Periodicity\BimonthlyTest;
|
||||
use Tests\unit\Support\Calendar\Periodicity\DailyTest;
|
||||
@@ -65,10 +66,11 @@ final class CalculatorTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider provideAllPeriodicity
|
||||
*
|
||||
*
|
||||
* @throws IntervalException
|
||||
*/
|
||||
#[DataProvider('provideAllPeriodicity')]
|
||||
public function testGivenADailyPeriodicityWhenCallTheNextDateByIntervalMethodThenReturnsTheExpectedDateSuccessful(CalculatorProvider $provider): void
|
||||
{
|
||||
$calculator = new Calculator();
|
||||
@@ -95,10 +97,11 @@ final class CalculatorTest extends TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider provideSkippedIntervals
|
||||
*
|
||||
*
|
||||
* @throws IntervalException
|
||||
*/
|
||||
#[DataProvider('provideSkippedIntervals')]
|
||||
public function testGivenAnEpochWithSkipIntervalNumberWhenCallTheNextDateBySkippedIntervalMethodThenReturnsTheExpectedDateSuccessful(CalculatorProvider $provider): void
|
||||
{
|
||||
$calculator = new Calculator();
|
||||
|
||||
@@ -25,6 +25,7 @@ declare(strict_types=1);
|
||||
namespace Tests\unit\Support\Calendar\Periodicity;
|
||||
|
||||
use FireflyIII\Support\Calendar\Periodicity\Interval;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use Tests\integration\TestCase;
|
||||
|
||||
abstract class IntervalTestCase extends TestCase
|
||||
@@ -32,8 +33,9 @@ abstract class IntervalTestCase extends TestCase
|
||||
abstract public static function provideIntervals(): array;
|
||||
|
||||
/**
|
||||
* @dataProvider provider
|
||||
*
|
||||
*/
|
||||
#[DataProvider('provider')]
|
||||
public function testGivenAnEpochWhenCallTheNextDateThenReturnsTheExpectedDateSuccessful(IntervalProvider $provider): void
|
||||
{
|
||||
$period = static::factory()->nextDate($provider->epoch);
|
||||
|
||||
Reference in New Issue
Block a user