本文整理汇总了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));
}
示例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');
}
示例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);
}
示例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.');
}
示例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.');
}
示例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.');
}
示例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');
});
}
示例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));
}
示例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));
}
示例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);
}
示例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.');
}
示例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, []);
}
示例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.');
}
示例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, []);
}
示例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, []);
}