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 6a9467a commit ebf1d20
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
12 changes: 10 additions & 2 deletions .idea/workspace.xml

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

9 changes: 8 additions & 1 deletion tests/DataTablesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Tests;

use atsanna\DataTables\DataTables;
use CodeIgniter\Shield\Models\UserModel;
use Tests\Support\TestCase;

/**
Expand All @@ -20,11 +21,17 @@ protected function setUp(): void
$this->dataTables->boot();
}

public function testBoot(): void
public function testBoot1(): void
{
$this->assertIsObject($this->dataTables->boot());
}

public function testBoot2(): void
{
$model = new UserModel();
$this->assertIsObject($this->dataTables->boot($model));
}

public function testTable(): void
{
$this->assertIsObject($this->dataTables->table());
Expand Down
7 changes: 6 additions & 1 deletion tests/Settings/ColumnTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ protected function setUp(): void
{
parent::setUp();

$this->column = new Column();
$config['name'] = 'name';
$config['searchable'] = 'true';
$config['visible'] = 'true';
$config['title'] = 'title';

$this->column = new Column($config);
}

public function testSetSearchable(): void
Expand Down

0 comments on commit ebf1d20

Please sign in to comment.