Exemple #1
0
        foreach ($this->directives as $directive) {
            $root .= $directive;
            $appended = true;
        }
        $this->directives = array();
        return $root . ($appended ? "\n" : '');
    }
}
$ext = new ReflectionExtension('xdebug');
ksort($settings);
echo "; This is a generated file, do not modify by hand\n\n";
foreach ($settings as $name => $info) {
    $w = str_repeat('-', 77);
    $xhtml = new ezcDocumentXhtml();
    $xhtml->loadString(ignore_links($info[3]));
    $docbook = $xhtml->getAsDocbook();
    // echo $docbook->save(), "\n\n";
    $convertor = new drDocumentDoctookToTextConvertor();
    $rst = $convertor->convert($docbook);
    $d = $rst->save();
    $d = join("\n; ", explode("\n", $d));
    echo <<<ENDL
; {$w}
; xdebug.{$name}
;
; Type: {$info[0]}, Default value: {$info[1]}
;
; {$d}
;
;xdebug.{$name} = {$info[1]}
 /**
  * @dataProvider getTestDocuments
  */
 public function testCommonConversions($from, $to)
 {
     if (!is_file($to)) {
         $this->markTestSkipped("Comparision file '{$to}' not yet defined.");
     }
     $document = new ezcDocumentXhtml();
     $document->setFilters(array(new ezcDocumentXhtmlElementFilter(), new ezcDocumentXhtmlMetadataFilter(), new ezcDocumentXhtmlTablesFilter()));
     $document->loadFile($from);
     $docbook = $document->getAsDocbook();
     $xml = $docbook->save();
     // Store test file, to have something to compare on failure
     $tempDir = $this->createTempDir('xhtml_tests_') . '/';
     file_put_contents($tempDir . basename($to), $xml);
     $this->assertTrue($docbook->validateString($xml));
     $this->assertEquals(file_get_contents($to), $xml, 'Document not visited as expected.');
     // Remove tempdir, when nothing failed.
     $this->removeTempDir();
 }