You are here

public function NormalizeTest::testConstructWithPatternsAddsPatterns in Bibliography Module 7.2

Implictely tests the addPatterns() method

File

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

Class

NormalizeTest

Code

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