function it_throws_an_exception_if_product_page_could_not_be_matched(ProductInterface $product, CurrentPageResolverInterface $currentPageResolver, UpdateConfigurableProductPageInterface $configurableUpdatePage) { $product->isSimple()->willReturn(true); $currentPageResolver->getCurrentPageWithForm([$configurableUpdatePage])->willReturn($configurableUpdatePage); $this->shouldThrow(new \InvalidArgumentException('Route name could not be matched to provided pages.'))->during('getCurrentPageWithForm', [[$configurableUpdatePage], $product]); }