Merge pull request #17 from manoel-freitas/fix/seed-fixtures-in-image
fix: ship seed image fixtures inside Docker image
|
Before Width: | Height: | Size: 151 KiB After Width: | Height: | Size: 151 KiB |
|
Before Width: | Height: | Size: 436 KiB After Width: | Height: | Size: 436 KiB |
|
Before Width: | Height: | Size: 254 KiB After Width: | Height: | Size: 254 KiB |
|
Before Width: | Height: | Size: 258 KiB After Width: | Height: | Size: 258 KiB |
|
Before Width: | Height: | Size: 622 KiB After Width: | Height: | Size: 622 KiB |
|
Before Width: | Height: | Size: 499 KiB After Width: | Height: | Size: 499 KiB |
|
Before Width: | Height: | Size: 244 KiB After Width: | Height: | Size: 244 KiB |
|
Before Width: | Height: | Size: 235 KiB After Width: | Height: | Size: 235 KiB |
|
Before Width: | Height: | Size: 239 KiB After Width: | Height: | Size: 239 KiB |
|
Before Width: | Height: | Size: 236 KiB After Width: | Height: | Size: 236 KiB |
|
Before Width: | Height: | Size: 360 KiB After Width: | Height: | Size: 360 KiB |
|
Before Width: | Height: | Size: 330 KiB After Width: | Height: | Size: 330 KiB |
|
Before Width: | Height: | Size: 302 KiB After Width: | Height: | Size: 302 KiB |
|
Before Width: | Height: | Size: 337 KiB After Width: | Height: | Size: 337 KiB |
@@ -173,7 +173,7 @@ class ContentSeeder extends Seeder
|
|||||||
|
|
||||||
private function copyFixture(string $fixtureName, string $destination): string
|
private function copyFixture(string $fixtureName, string $destination): string
|
||||||
{
|
{
|
||||||
$source = base_path('tests/fixtures/images/'.$fixtureName);
|
$source = base_path('database/fixtures/images/'.$fixtureName);
|
||||||
Storage::disk('public')->put($destination, File::get($source));
|
Storage::disk('public')->put($destination, File::get($source));
|
||||||
|
|
||||||
return $destination;
|
return $destination;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ it('ships visual content fixtures as valid jpeg images', function (): void {
|
|||||||
];
|
];
|
||||||
|
|
||||||
foreach ($fixtures as $fixture) {
|
foreach ($fixtures as $fixture) {
|
||||||
$path = dirname(__DIR__).'/fixtures/images/'.$fixture;
|
$path = dirname(__DIR__, 2).'/database/fixtures/images/'.$fixture;
|
||||||
|
|
||||||
expect(is_file($path))->toBeTrue("Missing fixture: {$fixture}");
|
expect(is_file($path))->toBeTrue("Missing fixture: {$fixture}");
|
||||||
|
|
||||||
|
|||||||