コード例 #1
0
 /**
  * Method to test the parse and process methods.
  */
 public function testParse()
 {
     $testResult = 'massa elementum. Mauris consequat';
     $input = file_get_contents(dirname(__DIR__) . '/data/parseHtml.txt');
     $parsed = $this->object->parse($input);
     $this->assertContains($testResult, $parsed);
 }
コード例 #2
0
 /**
  * Tests the parsing of HTML tags spanning the 2Kbyte boundary.
  */
 public function testBlockBoundary()
 {
     $testResult1 = 'some';
     $input = file_get_contents(dirname(__DIR__) . '/data/parseHtml3.txt');
     $output = $this->object->parse($input);
     // String $testResult1 is beyond the 2Kb boundary with a <script> tag
     // that spans the boundary.
     $this->assertContains($testResult1, $output);
 }