Skip to content

Commit

Permalink
Fix more failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SOHELAHMED7 committed Nov 13, 2024
1 parent 165ea0c commit ae229f4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public static function dependentOn()
{
return [
// just model class names
'Menu',

];
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<?php

/**
* This file is generated by Gii, do not change manually!
*/

namespace app\models\base;

/**
Expand All @@ -14,7 +18,7 @@
*
* @property \app\models\User $user
* @property \app\models\User $user2
* @property \app\models\User $user3
* @property \app\models\User $user3Rel
*/
abstract class Account extends \yii\db\ActiveRecord
{
Expand All @@ -29,11 +33,11 @@ public function rules()
'trim' => [['name', 'paymentMethodName'], 'trim'],
'required' => [['name'], 'required'],
'user_id_integer' => [['user_id'], 'integer'],
'user_id_exist' => [['user_id'], 'exist', 'targetRelation' => 'User'],
'user_id_exist' => [['user_id'], 'exist', 'targetRelation' => 'user'],
'user2_id_integer' => [['user2_id'], 'integer'],
'user2_id_exist' => [['user2_id'], 'exist', 'targetRelation' => 'User2'],
'user2_id_exist' => [['user2_id'], 'exist', 'targetRelation' => 'user2'],
'user3_integer' => [['user3'], 'integer'],
'user3_exist' => [['user3'], 'exist', 'targetRelation' => 'User3'],
'user3_exist' => [['user3'], 'exist', 'targetRelation' => 'user3Rel'],
'name_string' => [['name'], 'string', 'max' => 128],
'paymentMethodName_string' => [['paymentMethodName'], 'string'],
];
Expand All @@ -49,7 +53,7 @@ public function getUser2()
return $this->hasOne(\app\models\User::class, ['id' => 'user2_id']);
}

public function getUser3()
public function getUser3Rel()
{
return $this->hasOne(\app\models\User::class, ['id' => 'user3']);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<?php

/**
* This file is generated by Gii, do not change manually!
*/

namespace app\models\base;

/**
*
* This is the model class for table "menus".
*
* @property int $id
* @property string $name
Expand All @@ -25,7 +29,7 @@ public function rules()
'trim' => [['name'], 'trim'],
'required' => [['name'], 'required'],
'parent_id_integer' => [['parent_id'], 'integer'],
'parent_id_exist' => [['parent_id'], 'exist', 'targetRelation' => 'Parent'],
'parent_id_exist' => [['parent_id'], 'exist', 'targetRelation' => 'parent'],
'name_string' => [['name'], 'string', 'min' => 3, 'max' => 100],
];
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<?php

/**
* This file is generated by Gii, do not change manually!
*/

namespace app\models\base;

/**
*
* This is the model class for table "users".
*
* @property int $id
* @property string $name
Expand Down

0 comments on commit ae229f4

Please sign in to comment.