Skip to content

Commit

Permalink
♻️ phpstan and related tests and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
bnomei committed Jul 22, 2024
1 parent 223fa05 commit f4efb15
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/MongodbTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,20 +241,16 @@

it('can find a file', function () {
Khulan::index();
$lang = kirby()->language()->code();

// TODO: for some reason this is not working in CI
// without pushing the file to the cache manually
/** @var \Bnomei\KhulanFile $file */
$file = kirby()->file('betterharder/image.jpg');
expect($file)->toBeInstanceOf(\Kirby\Cms\File::class)
->and($file->filename())->toBe('image.jpg')
->and($file->writeKhulan($file->content($lang)->toArray(), $lang));
->and($file->filename())->toBe('image.jpg');

$file = khulan('betterharder/image.jpg');
expect($file)->toBeInstanceOf(\Kirby\Cms\File::class)
->and($file->filename())->toBe('image.jpg');
});
})->skipOnLinux('Does not work in CI for some reason');

it('will use the indices', function () {
Khulan::index();
Expand Down

0 comments on commit f4efb15

Please sign in to comment.