Beispiel #1
0
 /**
  * @covers ::startsWith
  */
 public function testStartsWith()
 {
     $this->assertTrue(Strings::startsWith("But Gollum, and the evil one", "But"));
     $this->assertFalse(Strings::startsWith("But Gollum, and the evil one", "but"));
     $this->assertTrue(Strings::startsWith("But Gollum, and the evil one", "but", false));
     $this->assertFalse(Strings::startsWith("But Gollum, and the evil one", "Gollum"));
     Strings::setUseMultiByte(true);
     $this->assertTrue(Strings::startsWith("But Gollum, and the evil one", "But"));
     $this->assertFalse(Strings::startsWith("But Gollum, and the evil one", "but"));
     $this->assertTrue(Strings::startsWith("But Gollum, and the evil one", "but", false));
     $this->assertFalse(Strings::startsWith("But Gollum, and the evil one", "Gollum"));
 }