Skip to content

Commit

Permalink
[#14349] - Correcting tests
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Sep 7, 2019
1 parent a185740 commit 6000b5a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/unit/Flash/Direct/Helper/FlashBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class FlashBase
private $notImplicit = false;
private $notHtml = false;
private $classes = null;
private $escaper = null;

private $default = [
'success' => 'successMessage',
Expand All @@ -33,8 +34,7 @@ class FlashBase

public function _before(UnitTester $I)
{
$this->newDi();
$this->setDiEscaper();
$this->escaper = $this->newEscaper();
}

/**
Expand Down Expand Up @@ -65,7 +65,9 @@ public function testFlashDirectImplicitFlushHtml(UnitTester $I)
*/
private function stringTest(UnitTester $I, string $function)
{
$flash = new Direct($this->classes);
$flash = new Direct($this->escaper);
$flash->setClasses($this->classes);

$message = 'sample message';

if ($this->notHtml) {
Expand Down Expand Up @@ -214,7 +216,8 @@ public function testFlashDirectNoImplicitFlushNoHtml(UnitTester $I)
*/
public function testFlashDirectWithAutoEscaping(UnitTester $I)
{
$flash = new Direct($this->classes);
$flash = new Direct($this->escaper);
$flash->setClasses($this->classes);

$flash->setAutomaticHtml(false);
$flash->setImplicitFlush(false);
Expand Down

0 comments on commit 6000b5a

Please sign in to comment.