Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
markvaneijk committed Apr 28, 2024
1 parent 5983161 commit 548c0e4
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<?php

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Queue;
use Vormkracht10\PermanentCache\Events\PermanentCacheUpdated;
use Vormkracht10\PermanentCache\Events\PermanentCacheUpdating;
use Vormkracht10\PermanentCache\Facades\PermanentCache;

require_once 'tests/Unit/CachedComponent/ScheduledAndQueuedCachedComponent.php';

beforeEach(function () {
Cache::driver('file')->clear();
Queue::fake();

(fn () => $this->cachers = new \SplObjectStorage)->call(app(\Vormkracht10\PermanentCache\PermanentCache::class));
});
Expand Down Expand Up @@ -49,4 +47,8 @@

expect($events)->toHaveCount(1);
expect($events->first()->expression)->toBe('* * * * *');

PermanentCache::update();

Queue::assertPushed(ScheduledAndQueuedCachedComponent::class);
});

0 comments on commit 548c0e4

Please sign in to comment.