File: class_rendering_003.phpt

package info (click to toggle)
php-doc 20250827~git.abe740d%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 71,968 kB
  • sloc: xml: 985,760; php: 25,504; javascript: 671; sh: 177; makefile: 37
file content (35 lines) | stat: -rw-r--r-- 987 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";

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

$config->xmlFile = $xmlFilePhpdoc;

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

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


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

$config->xmlFile = $xmlFileReferenceWithRole;

$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)