From adbf41a3f70cd39b267301300d41d21d3e01cbfa Mon Sep 17 00:00:00 2001 From: Joe <104938042+lrljoe@users.noreply.github.com> Date: Wed, 20 Nov 2024 02:55:54 +0000 Subject: [PATCH] Add ViewComponentColumn label test (#2075) --- tests/Unit/Views/Columns/ViewComponentColumnTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/Unit/Views/Columns/ViewComponentColumnTest.php b/tests/Unit/Views/Columns/ViewComponentColumnTest.php index dd96a25c7..5d3055cbd 100644 --- a/tests/Unit/Views/Columns/ViewComponentColumnTest.php +++ b/tests/Unit/Views/Columns/ViewComponentColumnTest.php @@ -77,4 +77,11 @@ public function test_can_use_custom_component(): void $this->assertSame('
2420
', $contents); }*/ + + public function test_can_not_user_as_label(): void + { + $this->expectException(DataTableConfigurationException::class); + + $column = ViewComponentColumn::make('Total Users')->label(fn () => 'My Label')->getContents(Pet::find(1)); + } }