Skip to content

Commit 9ab0b11

Browse files
authored
Add getContents Test
1 parent 1a2c9cf commit 9ab0b11

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/Unit/Views/Columns/LivewireComponentColumnTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,13 @@ public function test_can_get_html_string_correctly(): void
160160

161161
$this->assertStringContainsString('<div>Name:Cartman</div><div>Type:test</div>', $temp->pubGetHtmlString($temp->pubRetrieveAttributes($row), $key));
162162
}
163+
164+
public function test_can_get_contents_correctly(): void
165+
{
166+
$row = Pet::find(1);
167+
$temp = self::setup_with_public_methods();
168+
$key = 'test-table-'.$row->{$row->getKeyName()};
169+
170+
$this->assertStringContainsString('<div>Name:Cartman</div><div>Type:test</div>', $temp->getContents($row));
171+
}
163172
}

0 commit comments

Comments
 (0)