コード例 #1
0
 /**
  * @param string $element
  * @param string $message
  */
 private function assertValidationMessage($element, $message)
 {
     $product = $this->sharedStorage->has('product') ? $this->sharedStorage->get('product') : null;
     /** @var CreatePageInterface|UpdatePageInterface $currentPage */
     $currentPage = $this->currentPageResolver->getCurrentPageWithForm([$this->createSimpleProductPage, $this->createConfigurableProductPage, $this->updateSimpleProductPage, $this->updateConfigurableProductPage], $product);
     Assert::same($currentPage->getValidationMessage($element), $message);
 }
コード例 #2
0
 /**
  * @param string $element
  * @param string $message
  */
 private function assertValidationMessage($element, $message)
 {
     $product = $this->sharedStorage->has('product') ? $this->sharedStorage->get('product') : null;
     $currentPage = $this->currentPageResolver->getCurrentPageWithForm([$this->createSimpleProductPage, $this->createConfigurableProductPage, $this->updateSimpleProductPage, $this->updateConfigurableProductPage], $product);
     Assert::true($currentPage->checkValidationMessageFor($element, $message), sprintf('Product %s should be required.', $element));
 }