Skip to content

Commit

Permalink
Merge pull request #1979 from luistar15/fix-imagefixtures-path-separator
Browse files Browse the repository at this point in the history
Force path separator to / in ImageFixtures relative paths
  • Loading branch information
bobdenotter authored Oct 12, 2020
2 parents 57c5322 + 3f8d2c6 commit c5cba5a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DataFixtures/ContentFixtures.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ private function getFieldTypeValue(DeepCollection $field, bool $singleton, Conte
case 'image':
$randomImage = $this->imagesIndex->random();
$data = [
'filename' => $randomImage->getRelativePathname(),
'filename' => str_replace('\\', '/', $randomImage->getRelativePathname()),
'alt' => $this->faker->sentence(4, true),
'media' => '',
];
Expand All @@ -284,7 +284,7 @@ private function getFieldTypeValue(DeepCollection $field, bool $singleton, Conte
case 'file':
$randomImage = $this->imagesIndex->random();
$data = [
'filename' => $randomImage->getRelativePathname(),
'filename' => str_replace('\\', '/', $randomImage->getRelativePathname()),
'title' => $this->faker->sentence(4, true),
'media' => '',
];
Expand Down

0 comments on commit c5cba5a

Please sign in to comment.