public function replace() { $str = new String('www.müller.com'); $this->assertEquals(new String('müller'), $str->replace('www.')->replace('.com')); $this->assertEquals(new String('muller'), $str->replace('ü', 'u')); }