当前位置: 首页>>代码示例>>PHP>>正文


PHP Assert::same方法代码示例

本文整理汇总了PHP中Webmozart\Assert\Assert::same方法的典型用法代码示例。如果您正苦于以下问题:PHP Assert::same方法的具体用法?PHP Assert::same怎么用?PHP Assert::same使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Webmozart\Assert\Assert的用法示例。


在下文中一共展示了Assert::same方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: iShouldBeViewingTheAdministrationPanelIn

 /**
  * @Then I should be viewing the administration panel in :localeCode
  * @Then I should still be viewing the administration panel in :localeCode
  * @Then they should be viewing the administration panel in :localeCode
  */
 public function iShouldBeViewingTheAdministrationPanelIn($localeCode)
 {
     $this->dashboardPage->open();
     $expectedSubHeader = $this->translate('sylius.ui.overview_of_your_store', $localeCode);
     $actualSubHeader = $this->dashboardPage->getSubHeader();
     Assert::same($actualSubHeader, $expectedSubHeader, sprintf('Dashboard header should say "%s", but says "%s" instead.', $expectedSubHeader, $actualSubHeader));
 }
开发者ID:loic425,项目名称:Sylius,代码行数:12,代码来源:LocaleContext.php

示例2: iShouldSeeItemsInTheList

 /**
  * @Then I should see :numberOfItems items in the list
  */
 public function iShouldSeeItemsInTheList($numberOfItems)
 {
     Assert::same($numberOfItems, $this->orderShowPage->countItems(), '%s items should appear on order page, but %s rows has been found');
 }
开发者ID:TeamNovatek,项目名称:Sylius,代码行数:7,代码来源:AccountContext.php

示例3: assertFieldValidationMessage

 /**
  * @param string $element
  * @param string $expectedMessage
  */
 private function assertFieldValidationMessage($element, $expectedMessage)
 {
     /** @var CreatePageInterface|UpdatePageInterface $currentPage */
     $currentPage = $this->currentPageResolver->getCurrentPageWithForm([$this->createPage, $this->updatePage]);
     Assert::same($currentPage->getValidationMessage($element), $expectedMessage);
 }
开发者ID:TheMadeleine,项目名称:Sylius,代码行数:10,代码来源:ManagingPromotionsContext.php

示例4: iShouldBeNotifiedThatThisEmailIsAlreadyRegistered

 /**
  * @Then I should be notified that this email is already registered
  */
 public function iShouldBeNotifiedThatThisEmailIsAlreadyRegistered()
 {
     Assert::same($this->createPage->getAuthorValidationMessage(), 'This email is already registered, please login or use forgotten password.', 'There should be author validation error, but there is not.');
 }
开发者ID:loic425,项目名称:Sylius,代码行数:7,代码来源:ProductReviewContext.php

示例5: iShouldBeNotifiedThatTheShippingMethodIsRequired

 /**
  * @Then I should be notified that the shipping method is required
  */
 public function iShouldBeNotifiedThatTheShippingMethodIsRequired()
 {
     Assert::same($this->selectShippingPage->getValidationMessageForShipment(), 'Please select shipping method.');
 }
开发者ID:starspire,项目名称:Sylius,代码行数:7,代码来源:CheckoutContext.php

示例6: iShouldBeNotifiedThatProvinceCodeMustBeUnique

 /**
  * @Then /^I should be notified that province code must be unique$/
  */
 public function iShouldBeNotifiedThatProvinceCodeMustBeUnique()
 {
     Assert::same($this->updatePage->getValidationMessage('code'), 'Province code must be unique.');
 }
开发者ID:sylius,项目名称:sylius,代码行数:7,代码来源:ManagingCountriesContext.php

示例7: theAdministratorShouldSeeThatThisOrderHasBeenPlacedIn

 /**
  * @Then /^(the administrator) should see that (order placed by "[^"]+") has "([^"]+)" currency$/
  */
 public function theAdministratorShouldSeeThatThisOrderHasBeenPlacedIn(AdminUserInterface $user, OrderInterface $order, $currency)
 {
     $this->sharedSecurityService->performActionAsAdminUser($user, function () use($order, $currency) {
         $this->showPage->open(['id' => $order->getId()]);
         Assert::same($this->showPage->getOrderCurrency(), $currency, 'The order has been placed in %s, but it was expected to be placed in %s');
     });
 }
开发者ID:sylius,项目名称:sylius,代码行数:10,代码来源:ManagingOrdersContext.php

示例8: iShouldBeNotifiedThatIsRequired

 /**
  * @Then I should be notified that :element is required
  */
 public function iShouldBeNotifiedThatIsRequired($element)
 {
     /** @var CreatePageInterface|UpdatePageInterface $currentPage */
     $currentPage = $this->currentPageResolver->getCurrentPageWithForm([$this->createPage, $this->updatePage]);
     Assert::same($currentPage->getValidationMessage($element), sprintf('Please enter taxon %s.', $element));
 }
开发者ID:TeamNovatek,项目名称:Sylius,代码行数:9,代码来源:ManagingTaxonsContext.php

示例9: iShouldSeeZonesInTheList

 /**
  * @Then /^I should see (\d+) zones in the list$/
  */
 public function iShouldSeeZonesInTheList($number)
 {
     $resourcesOnPage = $this->indexPage->countItems();
     Assert::same((int) $number, $resourcesOnPage, sprintf('On list should be %d zones but get %d', $number, $resourcesOnPage));
 }
开发者ID:loic425,项目名称:Sylius,代码行数:8,代码来源:ManagingZonesContext.php

示例10: assertValidationMessage

 /**
  * @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);
 }
开发者ID:TheMadeleine,项目名称:Sylius,代码行数:11,代码来源:ManagingProductsContext.php

示例11: iShouldBeNotifiedThatChannelWithThisCodeAlreadyExists

 /**
  * @Then I should be notified that channel with this code already exists
  */
 public function iShouldBeNotifiedThatChannelWithThisCodeAlreadyExists()
 {
     Assert::same($this->createPage->getValidationMessage('code'), 'Channel code has to be unique.');
 }
开发者ID:ReissClothing,项目名称:Sylius,代码行数:7,代码来源:ManagingChannelsContext.php

示例12: shipmentShouldNotExistInTheRegistry

 /**
  * @Then /^there should be no shipments with ("[^"]+" shipping method) in the registry$/
  */
 public function shipmentShouldNotExistInTheRegistry(ShippingMethodInterface $shippingMethod)
 {
     $shippings = $this->shipmentRepository->findBy(['method' => $shippingMethod]);
     Assert::same($shippings, []);
 }
开发者ID:TeamNovatek,项目名称:Sylius,代码行数:8,代码来源:ShippingContext.php

示例13: assertCountOfExchangeRatesOnTheList

 /**
  * @param int $count
  *
  * @throws \InvalidArgumentException
  */
 private function assertCountOfExchangeRatesOnTheList($count)
 {
     $actualCount = $this->indexPage->countItems();
     Assert::same($actualCount, (int) $count, 'Expected %2$d exchange rates to be on the list, but found %d instead.');
 }
开发者ID:sylius,项目名称:sylius,代码行数:10,代码来源:ManagingExchangeRatesContext.php

示例14: thereAreNoVariants

 /**
  * @Then /^there should be no variants of (this product) in the product catalog$/
  */
 public function thereAreNoVariants(ProductInterface $product)
 {
     $variants = $this->productVariantRepository->findBy(['object' => $product]);
     Assert::same($variants, []);
 }
开发者ID:ReissClothing,项目名称:Sylius,代码行数:8,代码来源:ManagingProductsContext.php

示例15: paymentShouldNotExistInTheRegistry

 /**
  * @Then /^there should be no ("[^"]+" payments) in the registry$/
  */
 public function paymentShouldNotExistInTheRegistry(PaymentMethodInterface $paymentMethod)
 {
     $payments = $this->paymentRepository->findBy(['method' => $paymentMethod]);
     Assert::same($payments, []);
 }
开发者ID:TeamNovatek,项目名称:Sylius,代码行数:8,代码来源:PaymentContext.php


注:本文中的Webmozart\Assert\Assert::same方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。