public function testReplace() { $string = new String('Hello, world'); $string->replace('Hello', 'Goodbye'); $this->assertAttributeEquals('Goodbye, world', 'string', $string); }