forked from la-haute-societe/yii2-save-relations-behavior
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated tests for feature la-haute-societe#15 implementation coverage.
- Loading branch information
Showing
3 changed files
with
97 additions
and
1 deletion.
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
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,44 @@ | ||
<?php | ||
|
||
namespace tests\models; | ||
|
||
class Tag extends \yii\db\ActiveRecord | ||
{ | ||
/** @var int */ | ||
protected $order; | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public static function tableName() | ||
{ | ||
return 'tags'; | ||
} | ||
|
||
/** | ||
* @param int $order | ||
*/ | ||
public function setOrder($order) | ||
{ | ||
$this->order = $order; | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function getOrder() | ||
{ | ||
return $this->order; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function rules() | ||
{ | ||
return [ | ||
[['name'], 'required'], | ||
[['name'], 'string'] | ||
]; | ||
} | ||
} |