Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEV: tests: Unit models/LanguageTest
- Loading branch information
1 parent
85df347
commit 2b87fca
Showing
2 changed files
with
42 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace dameter\abstracts\tests\unit\models; | ||
|
||
require_once __DIR__ . "/TestBase.php"; | ||
|
||
use common\modules\abstracts\tests\unit\models\TestBase; | ||
use dameter\abstracts\models\Language; | ||
|
||
class LanguageTest extends TestBase | ||
{ | ||
|
||
/** @var Language */ | ||
protected $model; | ||
|
||
protected $modelClass = Language::class; | ||
|
||
|
||
public function baseModelAttributes() | ||
{ | ||
return [ | ||
'language_id' => 1, | ||
'code' => 'et', | ||
'name' => 'estonian' | ||
]; | ||
} | ||
|
||
public function testPrimaryKey() { | ||
$this->assertEquals(['language_id'], $this->model->primaryKey()); | ||
} | ||
|
||
public function testTableName() { | ||
$this->assertEquals('language', $this->model->tableName()); | ||
} | ||
|
||
|
||
} |