Fix code and tests.

This commit is contained in:
James Cole
2024-03-17 12:26:56 +01:00
parent 3913fa5086
commit b359d51d3a
12 changed files with 46 additions and 21 deletions

View File

@@ -27,7 +27,7 @@ namespace Tests\unit\Support;
use Carbon\Carbon;
use FireflyIII\Support\Navigation;
use Illuminate\Support\Facades\Log;
use PHPUnit\Framework\TestCase;
use Tests\integration\TestCase;
/**
* @group unit-test
@@ -101,6 +101,8 @@ final class NavigationStartOfPeriodTest extends TestCase
*/
public function testGivenADateAndUnknownFrequencyWhenCalculateTheDateThenReturnsTheSameDateSuccessful(string $frequency, Carbon $from, Carbon $expected): void
{
Log::spy();
Log::shouldReceive('error')
->with(sprintf('Cannot do startOfPeriod for $repeat_freq "%s"', $frequency))
->andReturnNull()