public function testPrefixFirstMiddleAndLastNameFormatWithOddSpacingAndUnicode() { $string = 'Dr. Hubert Alfred Cumberdale'; $name = Simple::fromString($string); $fmt = new Format($name); $expected = '☂ Dr. Hubert Alfred Cumberdale'; $this->assertEquals($expected, $fmt->like('☂ Prefix First Middle Last ')); $expected = '☂ Dr. H. A. C.'; $this->assertEquals($expected, $fmt->like('☂ P. F. M. L.')); $expected = '☂ Dr. Hubert A. C.'; $this->assertEquals($expected, $fmt->like('☂ Prefix First M. L.')); $expected = '☂ Dr. Cumberdale, H. A.'; $this->assertEquals($expected, $fmt->like('☂ Prefix Last, F. M.')); }
/** * @expectedException \Enzyme\Name\NameException */ public function testSimpleNameThrowsExceptionOnIncorrectStringData() { $name = Simple::fromString(''); }