Skip to content

Commit b8192f5

Browse files
committed
Fix failing tests
1 parent 69d3002 commit b8192f5

File tree

20 files changed

+32
-32
lines changed

20 files changed

+32
-32
lines changed

tests/specs/blog/models/base/Comment.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public function rules()
2828
'trim' => [['post_id'], 'trim'],
2929
'required' => [['post_id', 'author_id', 'message', 'created_at'], 'required'],
3030
'post_id_string' => [['post_id'], 'string', 'max' => 128],
31-
'post_id_exist' => [['post_id'], 'exist', 'targetRelation' => 'Post'],
31+
'post_id_exist' => [['post_id'], 'exist', 'targetRelation' => 'post'],
3232
'author_id_integer' => [['author_id'], 'integer'],
33-
'author_id_exist' => [['author_id'], 'exist', 'targetRelation' => 'Author'],
33+
'author_id_exist' => [['author_id'], 'exist', 'targetRelation' => 'author'],
3434
'message_default' => [['message'], 'default', 'value' => []],
3535
'meta_data_default' => [['meta_data'], 'default', 'value' => []],
3636
'created_at_integer' => [['created_at'], 'integer'],

tests/specs/blog/models/base/Post.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ public function rules()
3030
'trim' => [['title', 'slug', 'created_at'], 'trim'],
3131
'required' => [['title', 'category_id', 'active'], 'required'],
3232
'category_id_integer' => [['category_id'], 'integer'],
33-
'category_id_exist' => [['category_id'], 'exist', 'targetRelation' => 'Category'],
33+
'category_id_exist' => [['category_id'], 'exist', 'targetRelation' => 'category'],
3434
'created_by_id_integer' => [['created_by_id'], 'integer'],
35-
'created_by_id_exist' => [['created_by_id'], 'exist', 'targetRelation' => 'CreatedBy'],
35+
'created_by_id_exist' => [['created_by_id'], 'exist', 'targetRelation' => 'createdBy'],
3636
'title_unique' => [['title'], 'unique'],
3737
'slug_unique' => [['slug'], 'unique'],
3838
'title_string' => [['title'], 'string', 'max' => 255],

tests/specs/blog_v2/models/base/Comment.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public function rules()
2828
'trim' => [['message', 'meta_data', 'created_at'], 'trim'],
2929
'required' => [['post_id', 'message', 'created_at'], 'required'],
3030
'post_id_integer' => [['post_id'], 'integer'],
31-
'post_id_exist' => [['post_id'], 'exist', 'targetRelation' => 'Post'],
31+
'post_id_exist' => [['post_id'], 'exist', 'targetRelation' => 'post'],
3232
'user_id_integer' => [['user_id'], 'integer'],
33-
'user_id_exist' => [['user_id'], 'exist', 'targetRelation' => 'User'],
33+
'user_id_exist' => [['user_id'], 'exist', 'targetRelation' => 'user'],
3434
'message_string' => [['message'], 'string'],
3535
'meta_data_string' => [['meta_data'], 'string', 'min' => 1, 'max' => 300],
3636
'meta_data_default' => [['meta_data'], 'default', 'value' => ''],

tests/specs/blog_v2/models/base/Post.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ public function rules()
3232
'trim' => [['title', 'slug', 'created_at'], 'trim'],
3333
'required' => [['title', 'category_id', 'active'], 'required'],
3434
'category_id_integer' => [['category_id'], 'integer'],
35-
'category_id_exist' => [['category_id'], 'exist', 'targetRelation' => 'Category'],
35+
'category_id_exist' => [['category_id'], 'exist', 'targetRelation' => 'category'],
3636
'created_by_id_integer' => [['created_by_id'], 'integer'],
37-
'created_by_id_exist' => [['created_by_id'], 'exist', 'targetRelation' => 'CreatedBy'],
37+
'created_by_id_exist' => [['created_by_id'], 'exist', 'targetRelation' => 'createdBy'],
3838
'title_unique' => [['title'], 'unique'],
3939
'title_string' => [['title'], 'string', 'max' => 255],
4040
'slug_string' => [['slug'], 'string', 'min' => 1, 'max' => 200],

tests/specs/fk_col_name/app/models/base/Webhook.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public function rules()
2525
return [
2626
'trim' => [['name'], 'trim'],
2727
'user_id_integer' => [['user_id'], 'integer'],
28-
'user_id_exist' => [['user_id'], 'exist', 'targetRelation' => 'User'],
28+
'user_id_exist' => [['user_id'], 'exist', 'targetRelation' => 'user'],
2929
'redelivery_of_integer' => [['redelivery_of'], 'integer'],
30-
'redelivery_of_exist' => [['redelivery_of'], 'exist', 'targetRelation' => 'RedeliveryOf'],
30+
'redelivery_of_exist' => [['redelivery_of'], 'exist', 'targetRelation' => 'redeliveryOf'],
3131
'name_string' => [['name'], 'string'],
3232
];
3333
}

tests/specs/fk_col_name_index/app/models/base/Webhook.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ public function rules()
2727
return [
2828
'trim' => [['name'], 'trim'],
2929
'user_id_integer' => [['user_id'], 'integer'],
30-
'user_id_exist' => [['user_id'], 'exist', 'targetRelation' => 'User'],
30+
'user_id_exist' => [['user_id'], 'exist', 'targetRelation' => 'user'],
3131
'redelivery_of_integer' => [['redelivery_of'], 'integer'],
32-
'redelivery_of_exist' => [['redelivery_of'], 'exist', 'targetRelation' => 'RedeliveryOf'],
32+
'redelivery_of_exist' => [['redelivery_of'], 'exist', 'targetRelation' => 'redeliveryOf'],
3333
'rd_abc_2_integer' => [['rd_abc_2'], 'integer'],
34-
'rd_abc_2_exist' => [['rd_abc_2'], 'exist', 'targetRelation' => 'Rd2'],
34+
'rd_abc_2_exist' => [['rd_abc_2'], 'exist', 'targetRelation' => 'rd2'],
3535
'user_id_name_unique' => [['user_id', 'name'], 'unique', 'targetAttribute' => [
3636
'user_id',
3737
'name',

tests/specs/issue_fix/159_bug_giiapi_generated_rules_emailid/maria/models/base/Contact.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function rules()
2525
'trim' => [['nickname'], 'trim'],
2626
'required' => [['mailing_id'], 'required'],
2727
'mailing_id_integer' => [['mailing_id'], 'integer'],
28-
'mailing_id_exist' => [['mailing_id'], 'exist', 'targetRelation' => 'Mailing'],
28+
'mailing_id_exist' => [['mailing_id'], 'exist', 'targetRelation' => 'mailing'],
2929
'active_boolean' => [['active'], 'boolean'],
3030
'active_default' => [['active'], 'default', 'value' => false],
3131
'nickname_string' => [['nickname'], 'string'],

tests/specs/issue_fix/162_bug_dollarref_with_x_faker/app/models/base/Order.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function rules()
2424
return [
2525
'trim' => [['name', 'name2'], 'trim'],
2626
'invoice_id_integer' => [['invoice_id'], 'integer'],
27-
'invoice_id_exist' => [['invoice_id'], 'exist', 'targetRelation' => 'Invoice'],
27+
'invoice_id_exist' => [['invoice_id'], 'exist', 'targetRelation' => 'invoice'],
2828
'name_string' => [['name'], 'string'],
2929
'name2_string' => [['name2'], 'string'],
3030
];

tests/specs/issue_fix/175_bug_allof_with_multiple_dollarrefs/pgsql/models/base/Contact.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function rules()
2525
'trim' => [['nickname'], 'trim'],
2626
'required' => [['account_id'], 'required'],
2727
'account_id_integer' => [['account_id'], 'integer'],
28-
'account_id_exist' => [['account_id'], 'exist', 'targetRelation' => 'Account'],
28+
'account_id_exist' => [['account_id'], 'exist', 'targetRelation' => 'account'],
2929
'active_boolean' => [['active'], 'boolean'],
3030
'active_default' => [['active'], 'default', 'value' => false],
3131
'nickname_string' => [['nickname'], 'string'],

tests/specs/issue_fix/model_name_more_than_once_in_faker_148/app/models/base/E123.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ public function rules()
2727
return [
2828
'trim' => [['name'], 'trim'],
2929
'account_id_integer' => [['account_id'], 'integer'],
30-
'account_id_exist' => [['account_id'], 'exist', 'targetRelation' => 'Account'],
30+
'account_id_exist' => [['account_id'], 'exist', 'targetRelation' => 'account'],
3131
'account_2_id_integer' => [['account_2_id'], 'integer'],
32-
'account_2_id_exist' => [['account_2_id'], 'exist', 'targetRelation' => 'Account2'],
32+
'account_2_id_exist' => [['account_2_id'], 'exist', 'targetRelation' => 'account2'],
3333
'account_3_id_integer' => [['account_3_id'], 'integer'],
34-
'account_3_id_exist' => [['account_3_id'], 'exist', 'targetRelation' => 'Account3'],
34+
'account_3_id_exist' => [['account_3_id'], 'exist', 'targetRelation' => 'account3'],
3535
'name_string' => [['name'], 'string'],
3636
];
3737
}

0 commit comments

Comments
 (0)