We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 136210d commit 733c2eeCopy full SHA for 733c2ee
tests/Unit/Views/Columns/ComponentColumnTest.php
@@ -94,4 +94,18 @@ public function test_can_get_attributes(): void
94
$this->assertSame(2, $pet2_contents->getData()['attributes']['age']);
95
96
}
97
+
98
+ public function test_can_not_return_invalid_attributes_return(): void
99
+ {
100
+ $this->expectException(DataTableConfigurationException::class);
101
102
+ $column = ComponentColumn::make('Total Users')
103
+ ->component('livewire-tables-test::test')
104
+ ->attributes(fn ($value, $row, Column $column) => (string) 'test');
105
106
+ $contents = $column->getContents(Pet::find(1));
107
108
+ $this->assertSame('<div>2420</div>', $contents);
109
110
+ }
111
0 commit comments