Skip to content

Commit 6a9467a

Browse files
committed
Add new tests
1 parent 54cb9b1 commit 6a9467a

File tree

3 files changed

+25
-8
lines changed

3 files changed

+25
-8
lines changed

.idea/workspace.xml

Lines changed: 13 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Html/Table.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private function getFieldsFromModel(): array
106106
/**
107107
* @phpstan-ignore-next-line
108108
*/
109-
private function getTableData(): array
109+
public function getTableData(): array
110110
{
111111
return [
112112
[

tests/Html/TableTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ public function testRenderString(): void
7070
);
7171
}
7272

73+
public function testGetTableData(): void
74+
{
75+
$model = new UserModel();
76+
$this->table->setModel($model);
77+
78+
$this->assertIsArray(
79+
$this->table->getTableData(),
80+
'assert variable is array or not'
81+
);
82+
}
83+
7384
/* public function testFetch_data(): void
7485
{
7586
$model = new UserModel();

0 commit comments

Comments
 (0)