File: class_rendering_003.phpt

package info (click to toggle)
php-doc 20241205~git.dfcbb86%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 70,956 kB
  • sloc: xml: 968,269; php: 23,883; javascript: 671; sh: 177; makefile: 37
file content (35 lines) | stat: -rw-r--r-- 997 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
--TEST--
Class rendering 003 - compare output of phpdoc:classref and reference element with role="class" rendering
--FILE--
<?php
namespace phpdotnet\phd;

require_once __DIR__ . "/../../setup.php";

$xml_filePhpdoc = __DIR__ . "/data/class_rendering_001.xml";

$config->setXml_file($xml_filePhpdoc);

$formatPhpdoc = new TestPHPChunkedXHTML($config, $outputHandler);
$renderPhpdoc = new TestRender(new Reader($outputHandler), $config, $formatPhpdoc);

ob_start();
$renderPhpdoc->run();
$phpdocOutput = ob_get_clean();


$xml_fileReferenceWithRole = __DIR__ . "/data/class_rendering_002.xml";

$config->setXml_file($xml_fileReferenceWithRole);

$formatReferenceWithRole = new TestPHPChunkedXHTML($config, $outputHandler);
$renderReferenceWithRole = new TestRender(new Reader($outputHandler), $config, $formatReferenceWithRole);

ob_start();
$renderReferenceWithRole->run();
$referenceWithRoleOutput = ob_get_clean();

var_dump($phpdocOutput === $referenceWithRoleOutput);
?>
--EXPECT--
bool(true)