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


PHP Assert::notSame方法代码示例

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


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

示例1: format

 /**
  * {@inheritdoc}
  */
 public function format($amount, $currency, $locale = 'en')
 {
     $formatter = new \NumberFormatter($locale, \NumberFormatter::CURRENCY);
     $result = $formatter->formatCurrency($amount / 100, $currency);
     Assert::notSame(false, $result, sprintf('The amount "%s" of type %s cannot be formatted to currency "%s".', $amount, gettype($amount), $currency));
     return $result;
 }
开发者ID:TheMadeleine,项目名称:Sylius,代码行数:10,代码来源:MoneyFormatter.php

示例2: theAdministratorShouldKnowAboutIPAddressOfThisOrderMadeBy

 /**
  * @Then /^(the administrator) should know about IP address of (this order made by "[^"]+")$/
  */
 public function theAdministratorShouldKnowAboutIPAddressOfThisOrderMadeBy(AdminUserInterface $user, OrderInterface $order)
 {
     $this->sharedSecurityService->performActionAsAdminUser($user, function () use($order) {
         $this->showPage->open(['id' => $order->getId()]);
         Assert::notSame($this->showPage->getIpAddressAssigned(), '', 'There should be IP address assigned to order, but there is not.');
     });
 }
开发者ID:sylius,项目名称:sylius,代码行数:10,代码来源:ManagingOrdersContext.php

示例3: thisOrderShouldNotBeCancelled

 /**
  * @Then /^(this order) should not be cancelled$/
  */
 public function thisOrderShouldNotBeCancelled(OrderInterface $order)
 {
     Assert::notSame(OrderInterface::STATE_CANCELLED, $order->getState(), 'Order should not be cancelled, but its is.');
 }
开发者ID:sylius,项目名称:sylius,代码行数:7,代码来源:ManagingOrdersContext.php

示例4: iShouldNotSeeThemedHomepage

 /**
  * @Then I should not see a homepage from :theme theme
  */
 public function iShouldNotSeeThemedHomepage(ThemeInterface $theme)
 {
     $content = file_get_contents(rtrim($theme->getPath(), '/') . '/SyliusShopBundle/views/Homepage/index.html.twig');
     Assert::notSame($this->homePage->getContents(), $content);
 }
开发者ID:ReissClothing,项目名称:Sylius,代码行数:8,代码来源:ThemeContext.php


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