Since: 2.0.0
Author: Henry Ruhs
Exemplo n.º 1
0
 /**
  * testParser
  *
  * @since 2.1.0
  *
  * @param array $registry
  * @param string $input
  * @param string $route
  * @param string $expect
  *
  * @dataProvider providerParser
  */
 public function testParser($registry = array(), $input = null, $route = null, $expect = null)
 {
     /* setup */
     $this->_registry->init($registry);
     $parser = new Parser($this->_registry, $this->_language);
     $parser->init($input, $route, array('className' => array('break' => 'link-read-more', 'code' => 'box-code')));
     /* actual */
     $actual = $parser->getOutput();
     /* compare */
     $this->assertEquals($expect, $actual);
 }
Exemplo n.º 2
0
 /**
  * testParseBreak
  *
  * @since 2.1.0
  *
  * @param array $registry
  * @param string $text
  * @param string $route
  * @param string $expect
  *
  * @dataProvider providerParser
  */
 public function testParseBreak($registry = array(), $text = null, $route = null, $expect = null)
 {
     /* setup */
     $this->_registry->init($registry);
     $options = array('className' => array('break' => 'link-read-more', 'code' => 'box-code'));
     $parser = new Parser($this->_registry, $this->_language, $text, $route, $options);
     /* result */
     $result = $parser->getOutput();
     /* compare */
     $this->assertEquals($expect, $result);
 }
 /**
  * testModule
  *
  * @since 2.5.0
  *
  * @param string $input
  * @param string $expect
  *
  * @dataProvider providerModule
  */
 public function testModule($input = null, $expect = null)
 {
     /* setup */
     $parser = new Parser($this->_registry, $this->_language);
     $parser->init($input);
     /* actual */
     $actual = $parser->getOutput();
     /* compare */
     $this->assertEquals($expect, $actual);
 }