Skip to content

Commit

Permalink
test corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
niden committed Oct 24, 2023
1 parent fe919db commit 33a20d0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ public function mvcViewEngineVoltCompilerCompileStringExecuted(IntegrationTester
$I->assertSame($expected, $actual);

// Style executed in code
$this->tag->style()->reset();
$expected = '+<link rel="stylesheet" type="text/css" href="/css/some.css" media="screen" />'
. PHP_EOL
. '+<link rel="stylesheet" type="text/css" href="/css/other.css" media="screen" />'
Expand All @@ -186,6 +187,7 @@ public function mvcViewEngineVoltCompilerCompileStringExecuted(IntegrationTester
$I->assertSame($expected, $actual);

// Style after volt parsing
$this->tag->style()->reset();
$code = 'echo $this->tag->style("+")->add("/css/some.css")->add("/css/other.css");';
$expected = '+<link rel="stylesheet" type="text/css" href="/css/some.css" media="screen" />'
. PHP_EOL
Expand All @@ -210,10 +212,12 @@ public function mvcViewEngineVoltCompilerCompileStringExecuted(IntegrationTester
. PHP_EOL
. '+<script type="application/javascript" src="/js/other.js"></script>'
. PHP_EOL;
$this->tag->script()->reset();
$actual = (string) $this->tag->script('+')->add('/js/some.js')->add('/js/other.js');
$I->assertSame($expected, $actual);

// Script after volt parsing
$this->tag->script()->reset();
$code = 'echo $this->tag->script("+")->add("/js/some.js")->add("/js/other.js");';
$expected = '+<script type="application/javascript" src="/js/some.js"></script>'
. PHP_EOL
Expand Down

0 comments on commit 33a20d0

Please sign in to comment.