Skip to content

Commit

Permalink
Fix the uploaded image path generator spec
Browse files Browse the repository at this point in the history
  • Loading branch information
pamil committed Nov 30, 2020
1 parent c7dae1e commit ae37e37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Sylius/Behat/Service/ApiSecurityService.php
Expand Up @@ -49,7 +49,7 @@ public function logIn(UserInterface $user): void
);

$response = $this->client->getResponse();
$content = json_decode($response->getContent(), true);
$content = json_decode($response->getContent(), true, 512, \JSON_THROW_ON_ERROR);

Assert::keyExists(
$content,
Expand Down
Expand Up @@ -31,6 +31,6 @@ function it_generates_random_hashed_path_for_the_image(ImageInterface $image): v

$image->getFile()->willReturn($file);

$this->generate($image)->shouldMatch('/[a-z0-9]{2}\/[a-z0-9]{2}\/[a-zA-Z0-9]+[_-]*[.]jpeg/i');
$this->generate($image)->shouldMatch('/[a-z0-9]{2}\/[a-z0-9]{2}\/[a-zA-Z0-9]+[_-]*[.]jpe?g/i');
}
}

0 comments on commit ae37e37

Please sign in to comment.