Skip to content

Commit 8cb5080

Browse files
authored
Adjust test
1 parent 4d52908 commit 8cb5080

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
namespace Rappasoft\LaravelLivewireTables\Tests\Http\Livewire;
4+
5+
class TestLivewireColumnComponent extends \Livewire\Component
6+
{
7+
public string $id;
8+
public string $name;
9+
public string $value;
10+
public string $type;
11+
12+
/**
13+
* Get the view / contents that represent the component.
14+
*/
15+
public function render()
16+
{
17+
return \Illuminate\Support\Facades\Blade::render(
18+
'<div>'.
19+
'<div>Name:'.($this->name ?? 'Unknown').'</div>'.
20+
'<div>Type:'.($this->type ?? 'Unknown').'</div>'.
21+
'</div>'
22+
);
23+
24+
}
25+
}

tests/Unit/Views/Columns/LivewireComponentColumnTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function test_can_set_attribute_callback(): void
9393

9494
public static function setup_with_public_methods()
9595
{
96-
\Livewire\Livewire::component('test-component', \Rappasoft\LaravelLivewireTables\Tests\Http\Livewire\TestComponent::class);
96+
\Livewire\Livewire::component('test-livewire-column-component', \Rappasoft\LaravelLivewireTables\Tests\Http\Livewire\TestLivewireColumnComponent::class);
9797

9898
$row = Pet::find(1);
9999

0 commit comments

Comments
 (0)