Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Commit

Permalink
Add test for bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVanderbist committed Dec 14, 2019
1 parent 3f65fa9 commit 1978597
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/Features/Registration/RegistrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ public function it_can_register_a_single_component_with_a_custom_tag()
$this->assertEquals('my-custom-tag', $registeredComponents[1]->getTag());
}

/** @test */
public function it_can_register_a_single_snake_case_component()
{
BladeX::component('components.my_snake_case');

$registeredComponents = BladeX::registeredComponents();

$this->assertCount(2, $registeredComponents);
$this->assertEquals('components.my_snake_case', $registeredComponents[1]->view);
$this->assertEquals('my-snake-case', $registeredComponents[1]->getTag());
}

/** @test */
public function it_accepts_a_component_instance()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<div>hello</div>

0 comments on commit 1978597

Please sign in to comment.