Skip to content

Commit

Permalink
Add last fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomanhez committed Mar 23, 2021
1 parent 0125fc0 commit 2e9a709
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use Sylius\Component\Review\Model\ReviewInterface;
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;

/** @experimental */
final class AddProductReviewHandler implements MessageHandlerInterface
{
/** @var CustomerProviderInterface */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,11 @@ function let(
'Good stuff',
5,
'Really good stuff',
'example.com/api/v2/admin/products/666',
'boob@example.com'
'example.com/api/v2/shop/products/666'
);
}

function it_add_product_review_for_login_shop_user(
function it_adds_product_review_for_login_shop_user(
CustomerProviderInterface $customerProvider,
RepositoryInterface $productReviewRepository,
FactoryInterface $productReviewFactory,
Expand Down Expand Up @@ -77,7 +76,7 @@ function it_add_product_review_for_login_shop_user(
$this($addProductReview);
}

function it_add_product_review_for_visitor(
function it_adds_product_review_for_visitor(
CustomerProviderInterface $customerProvider,
RepositoryInterface $productReviewRepository,
FactoryInterface $productReviewFactory,
Expand All @@ -87,6 +86,7 @@ function it_add_product_review_for_visitor(
ReviewInterface $review
): void {
$addProductReview = $this->addProductReview;
$addProductReview->email = 'boob@example.com';

$iriConverter->getItemFromIri($addProductReview->product)->willReturn($product);

Expand All @@ -113,7 +113,6 @@ function it_throws_exception_if_shop_user_has_not_been_found(
ProductInterface $product
): void {
$addProductReview = $this->addProductReview;
$addProductReview->email = null;

$iriConverter->getItemFromIri($addProductReview->product)->willReturn($product);

Expand Down

0 comments on commit 2e9a709

Please sign in to comment.