Skip to content

Commit

Permalink
Exclude files/folders that are not worth testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ruff committed Sep 20, 2023
1 parent e10a9ce commit b1e2c21
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions build/phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
<directory suffix=".php">../src</directory>
</include>
<exclude>
<directory suffix=".php">../src/contracts</directory>
<directory suffix=".php">../src/exception</directory>
<file>../src/renderer/ZugferdVisualizerLaravelRenderer.php</file>
</exclude>
<report>
<xml outputDirectory="coverage"/>
Expand Down
4 changes: 0 additions & 4 deletions src/renderer/ZugferdVisualizerDefaultRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ public function render(ZugferdDocument $document, string $template): string
include $template;
$markup = ob_get_clean();

if (false === $markup) {
throw new \RuntimeException("Failed to render markup");
}

return $markup;
}
}
5 changes: 5 additions & 0 deletions tests/testcases/VisualizerText.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public function testRenderMarkupTemplateNotSet(): void
* @covers \horstoeko\zugferdvisualizer\ZugferdVisualizer::testMustUseDefaultRenderer
* @covers \horstoeko\zugferdvisualizer\ZugferdVisualizer::testTemplateIsSet
* @covers \horstoeko\zugferdvisualizer\ZugferdVisualizer::testTemplateExists
* @covers \horstoeko\zugferdvisualizer\renderer\ZugferdVisualizerDefaultRenderer::templateExists
*/
public function testRenderMarkupTemplateNotExists(): void
{
Expand All @@ -208,6 +209,7 @@ public function testRenderMarkupTemplateNotExists(): void
* @covers \horstoeko\zugferdvisualizer\ZugferdVisualizer::testMustUseDefaultRenderer
* @covers \horstoeko\zugferdvisualizer\ZugferdVisualizer::testTemplateIsSet
* @covers \horstoeko\zugferdvisualizer\ZugferdVisualizer::testTemplateExists
* @covers \horstoeko\zugferdvisualizer\renderer\ZugferdVisualizerDefaultRenderer::render
*/
public function testRenderMarkupWithDefaultTemplate(): void
{
Expand Down Expand Up @@ -258,6 +260,7 @@ public function testRenderPdfTemplateNotSet(): void
* @covers \horstoeko\zugferdvisualizer\ZugferdVisualizer::testMustUseDefaultRenderer
* @covers \horstoeko\zugferdvisualizer\ZugferdVisualizer::testTemplateIsSet
* @covers \horstoeko\zugferdvisualizer\ZugferdVisualizer::testTemplateExists
* @covers \horstoeko\zugferdvisualizer\renderer\ZugferdVisualizerDefaultRenderer::templateExists
*/
public function testRenderPdfTemplateNotExists(): void
{
Expand All @@ -277,6 +280,7 @@ public function testRenderPdfTemplateNotExists(): void
* @covers \horstoeko\zugferdvisualizer\ZugferdVisualizer::testTemplateIsSet
* @covers \horstoeko\zugferdvisualizer\ZugferdVisualizer::testTemplateExists
* @covers \horstoeko\zugferdvisualizer\ZugferdVisualizer::instanciatePdfEngine
* @covers \horstoeko\zugferdvisualizer\renderer\ZugferdVisualizerDefaultRenderer::render
*/
public function testRenderPdfWithDefaultTemplate(): void
{
Expand All @@ -297,6 +301,7 @@ public function testRenderPdfWithDefaultTemplate(): void
* @covers \horstoeko\zugferdvisualizer\ZugferdVisualizer::testTemplateIsSet
* @covers \horstoeko\zugferdvisualizer\ZugferdVisualizer::testTemplateExists
* @covers \horstoeko\zugferdvisualizer\ZugferdVisualizer::instanciatePdfEngine
* @covers \horstoeko\zugferdvisualizer\renderer\ZugferdVisualizerDefaultRenderer::render
*/
public function testRenderPdfFileWithDefaultTemplate(): void
{
Expand Down

0 comments on commit b1e2c21

Please sign in to comment.