/** @test */
public function testProSuffix()
{
$parser = new FullNameParser();
$tests = ['Smarty Pants Phd' => 'Phd', 'Smarty Pants PHD' => 'PHD', 'OLD MACDONALD, PHD' => 'PHD'];
$tests_no_match = ['OLD MACDONALD', 'OLD PHDMACDONALDPHD', 'Prof. Ron Brown'];
foreach ($tests as $test => $expected_result) {
$suffixes = $parser->get_pro_suffix($test);
// $this->assertTrue(false !== array_search($expected_result, $suffixes));
$this->assertContains($expected_result, $suffixes);
}
foreach ($tests_no_match as $test) {
$suffixes = $parser->get_pro_suffix($test);
// Should get empty array
$this->assertSame($suffixes, []);
}
}