Skip to content

Commit adf92fc

Browse files
committed
Test custom names and descriptions
1 parent 0afe4ab commit adf92fc

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

packages/framework/tests/Unit/Console/Helpers/ViewPublishGroupTest.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,30 @@ public function testCanCreateGroup()
4646
$this->assertSame($group->target, 'resources/views/vendor/hyde/layouts');
4747
$this->assertSame($group->files, ["app.blade.php", "page.blade.php", "post.blade.php"]);
4848
}
49+
50+
public function testCanCreateGroupWithCustomName()
51+
{
52+
$group = ViewPublishGroup::fromGroup('layouts', 'Custom Layouts');
53+
54+
$this->assertSame($group->name, 'Custom Layouts');
55+
$this->assertSame($group->description, "Publish the 'layouts' files for customization.");
56+
}
57+
58+
public function testCanCreateGroupWithCustomDescription()
59+
{
60+
$group = ViewPublishGroup::fromGroup('layouts', null, 'Custom description');
61+
62+
$this->assertSame($group->name, 'Layouts');
63+
$this->assertSame($group->description, 'Custom description');
64+
}
65+
66+
public function testCanCreateGroupWithCustomNameAndDescription()
67+
{
68+
$group = ViewPublishGroup::fromGroup('layouts', 'Custom Layouts', 'Custom description');
69+
70+
$this->assertSame($group->name, 'Custom Layouts');
71+
$this->assertSame($group->description, 'Custom description');
72+
}
4973
}
5074

5175
class TestViewPublishGroup extends ViewPublishGroup

0 commit comments

Comments
 (0)