-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests comparing old and new markup rendering output
- Loading branch information
haszi
committed
Jun 3, 2024
1 parent
d412ea7
commit d390274
Showing
2 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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::init(["xml_file" => $xml_filePhpdoc]); | ||
|
||
$formatPhpdoc = new TestPHPChunkedXHTML; | ||
$renderPhpdoc = new TestRender(new Reader, new Config, $formatPhpdoc); | ||
|
||
ob_start(); | ||
$renderPhpdoc->run(); | ||
$phpdocOutput = ob_get_clean(); | ||
|
||
|
||
$xml_fileReferenceWithRole = __DIR__ . "/data/class_rendering_002.xml"; | ||
|
||
Config::init(["xml_file" => $xml_fileReferenceWithRole]); | ||
|
||
$formatReferenceWithRole = new TestPHPChunkedXHTML; | ||
$renderReferenceWithRole = new TestRender(new Reader, new Config, $formatReferenceWithRole); | ||
|
||
ob_start(); | ||
$renderReferenceWithRole->run(); | ||
$referenceWithRoleOutput = ob_get_clean(); | ||
|
||
var_dump($phpdocOutput === $referenceWithRoleOutput); | ||
?> | ||
--EXPECT-- | ||
bool(true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--TEST-- | ||
Exception rendering 003 - compare output of phpdoc:exceptionref and reference element with role="exception" rendering | ||
--FILE-- | ||
<?php | ||
namespace phpdotnet\phd; | ||
|
||
require_once __DIR__ . "/../../setup.php"; | ||
|
||
$xml_filePhpdoc = __DIR__ . "/data/exception_rendering_001.xml"; | ||
|
||
Config::init(["xml_file" => $xml_filePhpdoc]); | ||
|
||
$formatPhpdoc = new TestPHPChunkedXHTML; | ||
$renderPhpdoc = new TestRender(new Reader, new Config, $formatPhpdoc); | ||
|
||
ob_start(); | ||
$renderPhpdoc->run(); | ||
$phpdocOutput = ob_get_clean(); | ||
|
||
|
||
$xml_fileReferenceWithRole = __DIR__ . "/data/exception_rendering_002.xml"; | ||
|
||
Config::init(["xml_file" => $xml_fileReferenceWithRole]); | ||
|
||
$formatReferenceWithRole = new TestPHPChunkedXHTML; | ||
$renderReferenceWithRole = new TestRender(new Reader, new Config, $formatReferenceWithRole); | ||
|
||
ob_start(); | ||
$renderReferenceWithRole->run(); | ||
$referenceWithRoleOutput = ob_get_clean(); | ||
|
||
var_dump($phpdocOutput === $referenceWithRoleOutput); | ||
?> | ||
--EXPECT-- | ||
bool(true) |