예제 #1
0
 /**
  * @dataProvider configurationExtensionsAndString
  */
 public function testMacroPreParsers($extension, $parser, $string)
 {
     $this->conf->setExtension($extension);
     $this->conf->setParser($parser);
     $this->conf->registerMacroPreParser('/(fail)/i', function ($matches, $raw) {
         return str_replace('fail', 'pass', $raw);
     });
     $decoded = $this->conf->callDecode($string);
     $this->assertEquals('pass', $decoded['test']);
 }