public function testPartReturnsCorrectShortDataWhenPeriodDefined() { $first = 'Mr.'; $short = 'Mr.'; $part = new Part($first); $this->assertEquals($short, $part->short()); }
/** * Tries to extract the short version of the given name from this part. * * @param Part $part The part to process. * * @return string */ protected function tryGetShortVersion($part) { return $part !== null ? $part->short() : ''; }