You are here

public function NormalizeTest::testAddPatternAddsPattern in Bibliography Module 7.2

File

lib/msrc-authortool/tests/NormalizeTest.php, line 35

Class

NormalizeTest

Code

public function testAddPatternAddsPattern() {
  $obj = new \Nametools\Normalize(new NormalizerTestMatchObject(), new \Nametools\RegexCounter());
  $obj
    ->addPattern("/^(.+?)\\s(.+?)\$/", array(
    'name',
    'email',
  ));
  $shouldMatch = array(
    "/^(.+?)\\s(.+?)\$/" => array(
      'name',
      'email',
    ),
  );
  $this
    ->assertEquals($shouldMatch, $obj
    ->getPatterns());
}