Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Generators/HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ class HTML extends Generator
*/
public function generate()
{
if (empty($this->docFiles) === true) {
return;
}

ob_start();
$this->printHeader();
$this->printToc();
Expand Down
4 changes: 4 additions & 0 deletions src/Generators/Markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ class Markdown extends Generator
*/
public function generate()
{
if (empty($this->docFiles) === true) {
return;
}

ob_start();
$this->printHeader();

Expand Down
78 changes: 0 additions & 78 deletions tests/Core/Generators/Expectations/ExpectedOutputNoDocs.html

This file was deleted.

2 changes: 0 additions & 2 deletions tests/Core/Generators/Expectations/ExpectedOutputNoDocs.md

This file was deleted.

2 changes: 1 addition & 1 deletion tests/Core/Generators/HTMLTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static function dataDocs()
return [
'Standard without docs' => [
'standard' => __DIR__.'/NoDocsTest.xml',
'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputNoDocs.html',
'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputEmpty.txt',
],
'Standard with one doc file' => [
'standard' => __DIR__.'/OneDocTest.xml',
Expand Down
2 changes: 1 addition & 1 deletion tests/Core/Generators/MarkdownTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public static function dataDocs()
return [
'Standard without docs' => [
'standard' => __DIR__.'/NoDocsTest.xml',
'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputNoDocs.md',
'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputEmpty.txt',
],
'Standard with one doc file' => [
'standard' => __DIR__.'/OneDocTest.xml',
Expand Down