public function testEndsWith() { $str = new Str("Hello, world."); $this->assertTrue($str->endsWith(".")); $this->assertTrue($str->endsWith("world.")); $this->assertTrue($str->endsWith("LD.", true)); $this->assertFalse($str->endsWith("H")); $this->assertFalse($str->endsWith("Hello,")); $this->assertFalse($str->endsWith("HE")); }