Webmozart\Assert\Assert::same PHP Method

same() public static method

public static same ( $value, $value2, $message = '' )
    public static function same($value, $value2, $message = '')
    {
        if ($value2 !== $value) {
            static::reportInvalidArgument(sprintf($message ?: 'Expected a value identical to %2$s. Got: %s', static::valueToString($value), static::valueToString($value2)));
        }
    }

Usage Example

Esempio n. 1
0
 /**
  * @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));
 }
All Usage Examples Of Webmozart\Assert\Assert::same