Skip to content

Commit

Permalink
Add new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
atsanna committed Mar 15, 2024
1 parent 54cb9b1 commit 6a9467a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 8 deletions.
20 changes: 13 additions & 7 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Html/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private function getFieldsFromModel(): array
/**
* @phpstan-ignore-next-line
*/
private function getTableData(): array
public function getTableData(): array
{
return [
[
Expand Down
11 changes: 11 additions & 0 deletions tests/Html/TableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,17 @@ public function testRenderString(): void
);
}

public function testGetTableData(): void
{
$model = new UserModel();
$this->table->setModel($model);

$this->assertIsArray(
$this->table->getTableData(),
'assert variable is array or not'
);
}

/* public function testFetch_data(): void
{
$model = new UserModel();
Expand Down

0 comments on commit 6a9467a

Please sign in to comment.