Skip to content

Commit

Permalink
SnippetTest: close slot buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed Dec 31, 2023
1 parent 5750149 commit efa4676
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/Template/SnippetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public function testFactory()

$openProp = new ReflectionProperty($snippet, 'open');
$openProp->setAccessible(true);
ob_end_flush(); // close opened slots
$this->assertTrue($openProp->getValue($snippet));

$snippet = Snippet::factory(null, ['message' => 'hello']);
Expand All @@ -57,9 +58,11 @@ public function testFactory()

$snippet = Snippet::factory('missin', ['message' => 'hello'], slots: true);
$this->assertInstanceOf(Snippet::class, $snippet);
ob_end_flush(); // close opened slots

$snippet = Snippet::factory(null, ['message' => 'hello'], slots: true);
$this->assertInstanceOf(Snippet::class, $snippet);
ob_end_flush(); // close opened slots
}

/**
Expand Down

0 comments on commit efa4676

Please sign in to comment.