contains() public static method

Assert that string contains a sequence of chars.
public static contains ( mixed $string, string $needle, string | null $message = null, string | null $propertyPath = null, string $encoding = 'utf8' ) : boolean
$string mixed
$needle string
$message string | null
$propertyPath string | null
$encoding string
return boolean
 /**
  * @Then I should see the logging messages
  */
 public function iShouldSeeTheLoggingMessages()
 {
     $display = $this->display;
     Assertion::contains($display, 'purging database');
     Assertion::contains($display, 'AppBundle\\DataFixtures\\ORM\\RoleFixture');
     Assertion::contains($display, 'AppBundle\\DataFixtures\\ORM\\AdminFixture');
 }
Ejemplo n.º 2
0
 /**
  * @Then /^the output should contain$/
  */
 public function theOutputShouldContain(PyStringNode $expectedOutput)
 {
     Assertion::contains(StringUtil::trimLines($this->getOutput()), StringUtil::trimLines((string) $expectedOutput));
 }
Ejemplo n.º 3
0
 public function testValidContains()
 {
     Assertion::contains("foo", "foo");
     Assertion::contains("foo", "oo");
 }
 /**
  * @Then I should see the amount of purged users
  */
 public function iShouldSeeTheAmountOfPurgedUsers()
 {
     Assertion::contains($this->display, 'Successfully purged 2 pending activations');
 }