public function NormalizeTest::testNormalizeNormalizeMethodWorks in Bibliography Module 7.2
File
- lib/
msrc-authortool/ tests/ NormalizeTest.php, line 128
Class
Code
public function testNormalizeNormalizeMethodWorks() {
$obj = new \Nametools\Normalize(new NormalizerTestMatchObject(), new \Nametools\RegexCounter());
$obj
->addPattern("/^(.+?)\\s(.+?)\$/", array(
'name',
'email',
));
$result = $obj
->normalize("John john@example.com");
$toMatch = new \NormalizerTestMatchObject();
$toMatch->name = "John";
$toMatch->email = "john@example.com";
$this
->assertEquals($toMatch, $result);
}