Move demo JPEGs from tests/fixtures (dockerignored) to database/fixtures so ContentSeeder works in the container.
37 lines
1.2 KiB
PHP
37 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
it('ships visual content fixtures as valid jpeg images', function (): void {
|
|
$fixtures = [
|
|
'og-default.jpg',
|
|
'service-casamentos.jpg',
|
|
'service-eventos-corporativos.jpg',
|
|
'service-celebracoes-intimistas.jpg',
|
|
'case-casamento-ana-lucas.jpg',
|
|
'gallery-casamento-ana-lucas-1.jpg',
|
|
'gallery-casamento-ana-lucas-2.jpg',
|
|
'case-lancamento-verano.jpg',
|
|
'gallery-lancamento-verano-1.jpg',
|
|
'gallery-lancamento-verano-2.jpg',
|
|
'case-mini-wedding-marina.jpg',
|
|
'gallery-mini-wedding-marina-1.jpg',
|
|
'gallery-mini-wedding-marina-2.jpg',
|
|
'about-image.jpg',
|
|
];
|
|
|
|
foreach ($fixtures as $fixture) {
|
|
$path = dirname(__DIR__, 2).'/database/fixtures/images/'.$fixture;
|
|
|
|
expect(is_file($path))->toBeTrue("Missing fixture: {$fixture}");
|
|
|
|
$info = getimagesize($path);
|
|
|
|
expect($info)->not->toBeFalse("Unreadable fixture: {$fixture}")
|
|
->and($info[0] ?? null)->toBeGreaterThan(0)
|
|
->and($info[1] ?? null)->toBeGreaterThan(0)
|
|
->and($info[2] ?? null)->toBe(IMAGETYPE_JPEG)
|
|
->and($info['mime'] ?? null)->toBe('image/jpeg');
|
|
}
|
|
});
|