Skip to content

Commit

Permalink
Components should have one root element
Browse files Browse the repository at this point in the history
  • Loading branch information
Jordan Hoff committed May 17, 2017
1 parent ba37ca2 commit be7d37c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/VueDirective.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class VueDirective
*/
public static function end() : string
{
return '<?php echo \Jhoff\BladeVue\Component::end(); ?>';
return '</div><?php echo \Jhoff\BladeVue\Component::end(); ?>';
}

/**
Expand All @@ -22,6 +22,6 @@ public static function end() : string
*/
public static function start(string $expression) : string
{
return "<?php echo \Jhoff\BladeVue\Component::start($expression); ?>";
return "<?php echo \Jhoff\BladeVue\Component::start($expression); ?><div>";
}
}
4 changes: 2 additions & 2 deletions tests/Unit/VueDirectiveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function startDirectiveReturnsCorrectPhpBlock()
$code = VueDirective::start('"component", ["foo" => "bar"]');

$this->assertEquals(
'<?php echo \Jhoff\BladeVue\Component::start("component", ["foo" => "bar"]); ?>',
'<?php echo \Jhoff\BladeVue\Component::start("component", ["foo" => "bar"]); ?><div>',
$code
);
}
Expand All @@ -29,7 +29,7 @@ public function endDirectiveReturnsCorrectPhpBlock()
$code = VueDirective::end();

$this->assertEquals(
'<?php echo \Jhoff\BladeVue\Component::end(); ?>',
'</div><?php echo \Jhoff\BladeVue\Component::end(); ?>',
$code
);
}
Expand Down

0 comments on commit be7d37c

Please sign in to comment.