Beispiel #1
0
 public function testPrepend()
 {
     $name = new Name('foo');
     $name->prepend('bar');
     $this->assertSame('bar\\foo', $name->toString());
     $name->prepend('foo\\bar');
     $this->assertSame('foo\\bar\\bar\\foo', $name->toString());
 }
Beispiel #2
0
 public function testToString()
 {
     $name = new Name('foo\\bar');
     $this->assertSame('foo\\bar', (string) $name);
     $this->assertSame('foo\\bar', $name->toString());
 }
 function toString()
 {
     return Name::toString() . " " . $this->_middleInitial;
 }