Skip to content

Commit cb0b3d5

Browse files
committed
Fix failing tests 2
1 parent bfaae12 commit cb0b3d5

File tree

22 files changed

+38
-38
lines changed

22 files changed

+38
-38
lines changed

tests/specs/id_not_in_rules/app/models/base/Fruit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public function rules()
2424
{
2525
return [
2626
'trim' => [['name'], 'trim'],
27-
'name_string' => [['name'], 'string'],
2827
'required' => [['name'], 'required'],
28+
'name_string' => [['name'], 'string'],
2929
];
3030
}
3131
}

tests/specs/issue_fix/132_create_migration_for_drop_table/mysql/models/base/Ubigpk.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public function rules()
3030
{
3131
return [
3232
'trim' => [['name', 'f'], 'trim'],
33+
'size_default' => [['size'], 'default', 'value' => 'x-small'],
3334
'name_string' => [['name'], 'string', 'max' => 150],
3435
'size_string' => [['size'], 'string'],
3536
'size_in' => [['size'], 'in', 'range' => [
@@ -39,7 +40,6 @@ public function rules()
3940
'large',
4041
'x-large',
4142
]],
42-
'size_default' => [['size'], 'default', 'value' => 'x-small'],
4343
'd_integer' => [['d'], 'integer'],
4444
'e_integer' => [['e'], 'integer'],
4545
'f_string' => [['f'], 'string', 'max' => 12],

tests/specs/issue_fix/153_nullable_false_in_required/app/models/base/Pristine.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ public static function tableName()
2323
public function rules()
2424
{
2525
return [
26-
'billing_factor_integer' => [['billing_factor'], 'integer'],
2726
'billing_factor_default' => [['billing_factor'], 'default', 'value' => 100],
2827
'required' => [['billing_factor'], 'required'],
28+
'billing_factor_integer' => [['billing_factor'], 'integer'],
2929
];
3030
}
3131
}

tests/specs/issue_fix/158_bug_giiapi_generated_rules_enum_with_trim/maria/models/base/Mailing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ public function rules()
2525
{
2626
return [
2727
'trim' => [['name'], 'trim'],
28+
'required' => [['name'], 'required'],
2829
'name_string' => [['name'], 'string', 'max' => 128],
2930
'paymentMethodName_string' => [['paymentMethodName'], 'string'],
3031
'paymentMethodName_in' => [['paymentMethodName'], 'in', 'range' => [
3132
'card',
3233
'cash',
3334
'ewallet',
3435
]],
35-
'required' => [['name'], 'required'],
3636
];
3737
}
3838
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ public function rules()
2727
{
2828
return [
2929
'trim' => [['nickname'], 'trim'],
30-
'mailing_id_integer' => [['mailing_id'], 'integer'],
31-
'mailing_id_exist' => [['mailing_id'], 'exist', 'targetRelation' => 'mailing'],
32-
'active_boolean' => [['active'], 'boolean'],
3330
'active_default' => [['active'], 'default', 'value' => false],
34-
'nickname_string' => [['nickname'], 'string'],
3531
'required' => [['mailing_id'], 'required'],
32+
'active_boolean' => [['active'], 'boolean'],
33+
'nickname_string' => [['nickname'], 'string'],
34+
'mailing_id_integer' => [['mailing_id'], 'integer'],
35+
'mailing_id_exist' => [['mailing_id'], 'exist', 'targetRelation' => 'mailing'],
3636
];
3737
}
3838

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public function rules()
2525
{
2626
return [
2727
'trim' => [['name', 'paymentMethodName'], 'trim'],
28+
'required' => [['name'], 'required'],
2829
'name_string' => [['name'], 'string', 'max' => 128],
2930
'paymentMethodName_string' => [['paymentMethodName'], 'string'],
30-
'required' => [['name'], 'required'],
3131
];
3232
}
3333

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ public function rules()
2727
{
2828
return [
2929
'trim' => [['name', 'name2'], 'trim'],
30-
'invoice_id_integer' => [['invoice_id'], 'integer'],
31-
'invoice_id_exist' => [['invoice_id'], 'exist', 'targetRelation' => 'invoice'],
3230
'name_string' => [['name'], 'string'],
3331
'name2_string' => [['name2'], 'string'],
32+
'invoice_id_integer' => [['invoice_id'], 'integer'],
33+
'invoice_id_exist' => [['invoice_id'], 'exist', 'targetRelation' => 'invoice'],
3434
];
3535
}
3636

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ public function rules()
2525
{
2626
return [
2727
'trim' => [['name', 'paymentMethodName'], 'trim'],
28+
'required' => [['name'], 'required'],
2829
'name_string' => [['name'], 'string', 'max' => 128],
2930
'paymentMethodName_string' => [['paymentMethodName'], 'string'],
30-
'required' => [['name'], 'required'],
3131
];
3232
}
3333

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ public function rules()
2727
{
2828
return [
2929
'trim' => [['nickname'], 'trim'],
30-
'account_id_integer' => [['account_id'], 'integer'],
31-
'account_id_exist' => [['account_id'], 'exist', 'targetRelation' => 'account'],
32-
'active_boolean' => [['active'], 'boolean'],
3330
'active_default' => [['active'], 'default', 'value' => false],
34-
'nickname_string' => [['nickname'], 'string'],
3531
'required' => [['account_id'], 'required'],
32+
'active_boolean' => [['active'], 'boolean'],
33+
'nickname_string' => [['nickname'], 'string'],
34+
'account_id_integer' => [['account_id'], 'integer'],
35+
'account_id_exist' => [['account_id'], 'exist', 'targetRelation' => 'account'],
3636
];
3737
}
3838

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ public function rules()
2424
{
2525
return [
2626
'trim' => [['name'], 'trim'],
27-
'name_unique' => [['name'], 'unique'],
28-
'name_string' => [['name'], 'string', 'max' => 150],
2927
'required' => [['name'], 'required'],
28+
'name_string' => [['name'], 'string', 'max' => 150],
29+
'name_unique' => [['name'], 'unique'],
3030
];
3131
}
3232
}

tests/specs/issue_fix/25_generate_inverse_relations/mysql/models/base/Account.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ public function rules()
3232
return [
3333
'trim' => [['name', 'paymentMethodName'], 'trim'],
3434
'required' => [['name'], 'required'],
35+
'name_string' => [['name'], 'string', 'max' => 128],
36+
'paymentMethodName_string' => [['paymentMethodName'], 'string'],
3537
'user_id_integer' => [['user_id'], 'integer'],
3638
'user_id_exist' => [['user_id'], 'exist', 'targetRelation' => 'user'],
3739
'user2_id_integer' => [['user2_id'], 'integer'],
3840
'user2_id_exist' => [['user2_id'], 'exist', 'targetRelation' => 'user2'],
3941
'user3_integer' => [['user3'], 'integer'],
4042
'user3_exist' => [['user3'], 'exist', 'targetRelation' => 'user3Rel'],
41-
'name_string' => [['name'], 'string', 'max' => 128],
42-
'paymentMethodName_string' => [['paymentMethodName'], 'string'],
4343
];
4444
}
4545

tests/specs/issue_fix/25_generate_inverse_relations/mysql/models/base/Menu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public function rules()
2828
return [
2929
'trim' => [['name'], 'trim'],
3030
'required' => [['name'], 'required'],
31+
'name_string' => [['name'], 'string', 'min' => 3, 'max' => 100],
3132
'parent_id_integer' => [['parent_id'], 'integer'],
3233
'parent_id_exist' => [['parent_id'], 'exist', 'targetRelation' => 'parent'],
33-
'name_string' => [['name'], 'string', 'min' => 3, 'max' => 100],
3434
];
3535
}
3636

tests/specs/issue_fix/29_extension_fk_column_name_cause_error_in_case_of_column_name_without_underscore/mysql/models/base/Post.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public function rules()
2626
{
2727
return [
2828
'trim' => [['content'], 'trim'],
29+
'content_string' => [['content'], 'string'],
2930
'user_integer' => [['user'], 'integer'],
3031
'user_exist' => [['user'], 'exist', 'targetRelation' => 'userRel'],
31-
'content_string' => [['content'], 'string'],
3232
];
3333
}
3434

tests/specs/issue_fix/3_bug_add_remove_property_and_at_the_same_time_change_it_at_x_indexes/mysql/models/base/Address.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ public function rules()
2626
{
2727
return [
2828
'trim' => [['name', 'shortName', 'postCode'], 'trim'],
29+
'name_string' => [['name'], 'string', 'max' => 64],
30+
'shortName_string' => [['shortName'], 'string', 'max' => 64],
31+
'postCode_string' => [['postCode'], 'string', 'max' => 64],
2932
'shortName_postCode_unique' => [['shortName', 'postCode'], 'unique', 'targetAttribute' => [
3033
'shortName',
3134
'postCode',
3235
]],
33-
'name_string' => [['name'], 'string', 'max' => 64],
34-
'shortName_string' => [['shortName'], 'string', 'max' => 64],
35-
'postCode_string' => [['postCode'], 'string', 'max' => 64],
3636
];
3737
}
3838
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public function rules()
2424
{
2525
return [
2626
'trim' => [['name'], 'trim'],
27-
'name_string' => [['name'], 'string', 'max' => 40],
2827
'required' => [['name'], 'required'],
28+
'name_string' => [['name'], 'string', 'max' => 40],
2929
];
3030
}
3131

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ public function rules()
3030
{
3131
return [
3232
'trim' => [['name'], 'trim'],
33+
'name_string' => [['name'], 'string'],
3334
'account_id_integer' => [['account_id'], 'integer'],
3435
'account_id_exist' => [['account_id'], 'exist', 'targetRelation' => 'account'],
3536
'account_2_id_integer' => [['account_2_id'], 'integer'],
3637
'account_2_id_exist' => [['account_2_id'], 'exist', 'targetRelation' => 'account2'],
3738
'account_3_id_integer' => [['account_3_id'], 'integer'],
3839
'account_3_id_exist' => [['account_3_id'], 'exist', 'targetRelation' => 'account3'],
39-
'name_string' => [['name'], 'string'],
4040
];
4141
}
4242

tests/specs/relations_in_faker/app/models/base/A123.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public function rules()
2626
{
2727
return [
2828
'trim' => [['name'], 'trim'],
29+
'name_string' => [['name'], 'string'],
2930
'b123_id_integer' => [['b123_id'], 'integer'],
3031
'b123_id_exist' => [['b123_id'], 'exist', 'targetRelation' => 'b123'],
31-
'name_string' => [['name'], 'string'],
3232
];
3333
}
3434

tests/specs/relations_in_faker/app/models/base/Account.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public function rules()
2424
{
2525
return [
2626
'trim' => [['name'], 'trim'],
27-
'name_string' => [['name'], 'string', 'max' => 40],
2827
'required' => [['name'], 'required'],
28+
'name_string' => [['name'], 'string', 'max' => 40],
2929
];
3030
}
3131

tests/specs/relations_in_faker/app/models/base/B123.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public function rules()
2626
{
2727
return [
2828
'trim' => [['name'], 'trim'],
29+
'name_string' => [['name'], 'string'],
2930
'c123_id_integer' => [['c123_id'], 'integer'],
3031
'c123_id_exist' => [['c123_id'], 'exist', 'targetRelation' => 'c123'],
31-
'name_string' => [['name'], 'string'],
3232
];
3333
}
3434

tests/specs/relations_in_faker/app/models/base/Domain.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ public function rules()
2828
{
2929
return [
3030
'trim' => [['name'], 'trim'],
31+
'required' => [['name', 'account_id'], 'required'],
32+
'name_string' => [['name'], 'string', 'max' => 128],
3133
'account_id_integer' => [['account_id'], 'integer'],
3234
'account_id_exist' => [['account_id'], 'exist', 'targetRelation' => 'account'],
33-
'name_string' => [['name'], 'string', 'max' => 128],
34-
'required' => [['name', 'account_id'], 'required'],
3535
];
3636
}
3737

tests/specs/relations_in_faker/app/models/base/E123.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public function rules()
2626
{
2727
return [
2828
'trim' => [['name'], 'trim'],
29+
'name_string' => [['name'], 'string'],
2930
'b123_id_integer' => [['b123_id'], 'integer'],
3031
'b123_id_exist' => [['b123_id'], 'exist', 'targetRelation' => 'b123'],
31-
'name_string' => [['name'], 'string'],
3232
];
3333
}
3434

tests/specs/relations_in_faker/app/models/base/Routing.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ public function rules()
3434
{
3535
return [
3636
'trim' => [['path', 'service'], 'trim'],
37+
'required' => [['domain_id'], 'required'],
38+
'path_string' => [['path'], 'string', 'max' => 255],
39+
'ssl_boolean' => [['ssl'], 'boolean'],
40+
'redirect_to_ssl_boolean' => [['redirect_to_ssl'], 'boolean'],
41+
'service_string' => [['service'], 'string', 'max' => 255],
3742
'domain_id_integer' => [['domain_id'], 'integer'],
3843
'domain_id_exist' => [['domain_id'], 'exist', 'targetRelation' => 'domain'],
3944
'd123_id_integer' => [['d123_id'], 'integer'],
4045
'd123_id_exist' => [['d123_id'], 'exist', 'targetRelation' => 'd123'],
4146
'a123_id_integer' => [['a123_id'], 'integer'],
4247
'a123_id_exist' => [['a123_id'], 'exist', 'targetRelation' => 'a123'],
43-
'path_string' => [['path'], 'string', 'max' => 255],
44-
'ssl_boolean' => [['ssl'], 'boolean'],
45-
'redirect_to_ssl_boolean' => [['redirect_to_ssl'], 'boolean'],
46-
'service_string' => [['service'], 'string', 'max' => 255],
47-
'required' => [['domain_id'], 'required'],
4848
];
4949
}
5050

0 commit comments

Comments
 (0)