Skip to content

Commit

Permalink
Assert contents after cleanup in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Oct 23, 2023
1 parent c879503 commit f393686
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/PugBladeCompilerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,13 @@ public function testCompile()
$contents = ob_get_contents();
ob_end_clean();

self::assertSame('<h1>Pug is there</h1><p>By HTML syntax!</p><div>Go</div>', $contents);

// Cleanup
if (file_exists($compiledPath)) {
unlink($compiledPath);
clearstatcache();
}

self::assertSame('<h1>Pug is there</h1><p>By HTML syntax!</p><div>Go</div>', $contents);
}

/**
Expand Down Expand Up @@ -205,13 +205,13 @@ public function testGetAndSetPath()
$contents = ob_get_contents();
ob_end_clean();

self::assertSame('<h1>Pug is there</h1><p>By HTML syntax!</p><div>Go</div>', $contents);

// Cleanup
if (file_exists($compiledPath)) {
unlink($compiledPath);
clearstatcache();
}

self::assertSame('<h1>Pug is there</h1><p>By HTML syntax!</p><div>Go</div>', $contents);
}

/**
Expand Down Expand Up @@ -243,13 +243,13 @@ public function testPhpDirective()
$contents = ob_get_contents();
ob_end_clean();

self::assertSame('<div><p>12</p><p>24</p></div>', $contents);

// Cleanup
if (file_exists($compiledPath)) {
unlink($compiledPath);
clearstatcache();
}

self::assertSame('<div><p>12</p><p>24</p></div>', $contents);
}

/**
Expand Down

0 comments on commit f393686

Please sign in to comment.