Skip to content

Commit e69fc04

Browse files
committed
Fix failing tests
1 parent 45f3f90 commit e69fc04

File tree

28 files changed

+0
-185
lines changed

28 files changed

+0
-185
lines changed

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,4 @@ public function getPosts()
3838
{
3939
return $this->hasMany(\app\models\Post::class, ['category_id' => 'id'])->inverseOf('category');
4040
}
41-
42-
public function getPost()
43-
{
44-
return $this->hasOne(\app\models\Post::class, ['category_id' => 'id'])->inverseOf('category');
45-
}
4641
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,4 @@ public function getComments()
6161
{
6262
return $this->hasMany(\app\models\Comment::class, ['post_id' => 'uid'])->inverseOf('post');
6363
}
64-
65-
public function getComment()
66-
{
67-
return $this->hasOne(\app\models\Comment::class, ['post_id' => 'uid'])->inverseOf('post');
68-
}
6964
}

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,4 @@ public function rules()
4444
'email_unique' => [['email'], 'unique'],
4545
];
4646
}
47-
48-
public function getPost()
49-
{
50-
return $this->hasOne(\app\models\Post::class, ['created_by_id' => 'id'])->inverseOf('created_by');
51-
}
52-
53-
public function getComment2()
54-
{
55-
return $this->hasOne(\app\models\Comment::class, ['author_id' => 'id'])->inverseOf('author');
56-
}
5747
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,4 @@ public function getPosts()
3838
{
3939
return $this->hasMany(\app\models\Post::class, ['category_id' => 'id'])->inverseOf('category');
4040
}
41-
42-
public function getPost()
43-
{
44-
return $this->hasOne(\app\models\Post::class, ['category_id' => 'id'])->inverseOf('category');
45-
}
4641
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,4 @@ public function getTags()
7373
return $this->hasMany(\app\models\Tag::class, ['id' => 'tag_id'])
7474
->viaTable('posts2tags', ['post_id' => 'id']);
7575
}
76-
77-
public function getComment()
78-
{
79-
return $this->hasOne(\app\models\Comment::class, ['post_id' => 'id'])->inverseOf('post');
80-
}
8176
}

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,4 @@ public function rules()
4747
'email_unique' => [['email'], 'unique'],
4848
];
4949
}
50-
51-
public function getPost()
52-
{
53-
return $this->hasOne(\app\models\Post::class, ['created_by_id' => 'id'])->inverseOf('created_by');
54-
}
55-
56-
public function getComment2()
57-
{
58-
return $this->hasOne(\app\models\Comment::class, ['user_id' => 'id'])->inverseOf('user');
59-
}
6050
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,4 @@ public function rules()
2727
'title_string' => [['title'], 'string'],
2828
];
2929
}
30-
31-
public function getWebhook()
32-
{
33-
return $this->hasOne(\app\models\Webhook::class, ['redelivery_of' => 'id'])->inverseOf('redelivery_of');
34-
}
3530
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,4 @@ public function rules()
2828
'name_string' => [['name'], 'string'],
2929
];
3030
}
31-
32-
public function getWebhook()
33-
{
34-
return $this->hasOne(\app\models\Webhook::class, ['user_id' => 'id'])->inverseOf('user');
35-
}
3631
}

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,4 @@ public function rules()
2727
'title_string' => [['title'], 'string'],
2828
];
2929
}
30-
31-
public function getWebhook()
32-
{
33-
return $this->hasOne(\app\models\Webhook::class, ['redelivery_of' => 'id'])->inverseOf('redelivery_of');
34-
}
35-
36-
public function getWebhook2()
37-
{
38-
return $this->hasOne(\app\models\Webhook::class, ['rd_abc_2' => 'id'])->inverseOf('rd2');
39-
}
4030
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,4 @@ public function rules()
2828
'name_string' => [['name'], 'string'],
2929
];
3030
}
31-
32-
public function getWebhook()
33-
{
34-
return $this->hasOne(\app\models\Webhook::class, ['user_id' => 'id'])->inverseOf('user');
35-
}
3631
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,4 @@ public function rules()
3030
'paymentMethodName_string' => [['paymentMethodName'], 'string'],
3131
];
3232
}
33-
34-
public function getContact()
35-
{
36-
return $this->hasOne(\app\models\Contact::class, ['mailing_id' => 'id'])->inverseOf('mailing');
37-
}
3833
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,4 @@ public function rules()
2323
{
2424
return [];
2525
}
26-
27-
public function getOrder()
28-
{
29-
return $this->hasOne(\app\models\Order::class, ['invoice_id' => 'id'])->inverseOf('invoice');
30-
}
3126
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,4 @@ public function rules()
3030
'paymentMethodName_string' => [['paymentMethodName'], 'string'],
3131
];
3232
}
33-
34-
public function getContact()
35-
{
36-
return $this->hasOne(\app\models\Contact::class, ['account_id' => 'id'])->inverseOf('account');
37-
}
3833
}

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,4 @@ public function getAccounts()
3434
{
3535
return $this->hasMany(\app\models\Account::class, ['user_id' => 'id'])->inverseOf('user');
3636
}
37-
38-
public function getAccount()
39-
{
40-
return $this->hasOne(\app\models\Account::class, ['user_id' => 'id'])->inverseOf('user');
41-
}
42-
43-
public function getAccount2()
44-
{
45-
return $this->hasOne(\app\models\Account::class, ['user2_id' => 'id'])->inverseOf('user2');
46-
}
47-
48-
public function getAccount3()
49-
{
50-
return $this->hasOne(\app\models\Account::class, ['user3' => 'id'])->inverseOf('user3');
51-
}
5237
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,4 @@ public function rules()
2727
'name_string' => [['name'], 'string'],
2828
];
2929
}
30-
31-
public function getPost()
32-
{
33-
return $this->hasOne(\app\models\Post::class, ['user' => 'id'])->inverseOf('user');
34-
}
3530
}

tests/specs/issue_fix/52_bug_dependenton_allof_with_x_faker_false/mysql/models/base/Animal.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,4 @@ public function rules()
2727
'name_string' => [['name'], 'string'],
2828
];
2929
}
30-
31-
public function getInvoice()
32-
{
33-
return $this->hasOne(\app\models\Invoice::class, ['animal_id' => 'id'])->inverseOf('animal');
34-
}
3530
}

tests/specs/issue_fix/52_bug_dependenton_allof_with_x_faker_false/mysql/models/base/Fruit.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,4 @@ public function rules()
2727
'name_string' => [['name'], 'string'],
2828
];
2929
}
30-
31-
public function getInvoice()
32-
{
33-
return $this->hasOne(\app\models\Invoice::class, ['fruit_id' => 'id'])->inverseOf('fruit');
34-
}
3530
}

tests/specs/issue_fix/52_bug_dependenton_allof_with_x_faker_false/mysql/models/base/User.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,4 @@ public function rules()
2727
'name_string' => [['name'], 'string'],
2828
];
2929
}
30-
31-
public function getInvoice()
32-
{
33-
return $this->hasOne(\app\models\Invoice::class, ['user_id' => 'id'])->inverseOf('user');
34-
}
35-
36-
public function getInvoice2()
37-
{
38-
return $this->hasOne(\app\models\Invoice::class, ['user_2_id' => 'id'])->inverseOf('user_2');
39-
}
4030
}

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,4 @@ public function rules()
2828
'name_string' => [['name'], 'string', 'max' => 40],
2929
];
3030
}
31-
32-
public function getE123()
33-
{
34-
return $this->hasOne(\app\models\E123::class, ['account_id' => 'id'])->inverseOf('account');
35-
}
36-
37-
public function getE1232()
38-
{
39-
return $this->hasOne(\app\models\E123::class, ['account_2_id' => 'id'])->inverseOf('account_2');
40-
}
41-
42-
public function getE1233()
43-
{
44-
return $this->hasOne(\app\models\E123::class, ['account_3_id' => 'id'])->inverseOf('account_3');
45-
}
4631
}

tests/specs/petstore/models/base/Store.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,4 @@ public function rules()
2828
'name_string' => [['name'], 'string'],
2929
];
3030
}
31-
32-
public function getPet()
33-
{
34-
return $this->hasOne(\app\models\Pet::class, ['store_id' => 'id'])->inverseOf('store');
35-
}
3631
}

tests/specs/petstore_jsonapi/models/base/Pet.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,4 @@ public function getDuplicates()
6363
{
6464
return $this->hasMany(\app\models\Pet::class, ['tag' => 'tag']);
6565
}
66-
67-
public function getPetStatistic()
68-
{
69-
return $this->hasOne(\app\models\PetStatistic::class, ['parentPet_id' => 'id'])->inverseOf('parentPet');
70-
}
7166
}

tests/specs/petstore_namespace/mymodels/base/Store.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,4 @@ public function rules()
2828
'name_string' => [['name'], 'string'],
2929
];
3030
}
31-
32-
public function getPet()
33-
{
34-
return $this->hasOne(\app\mymodels\Pet::class, ['store_id' => 'id'])->inverseOf('store');
35-
}
3631
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,4 @@ public function getB123()
3636
{
3737
return $this->hasOne(\app\models\B123::class, ['id' => 'b123_id']);
3838
}
39-
40-
public function getRouting()
41-
{
42-
return $this->hasOne(\app\models\Routing::class, ['a123_id' => 'id'])->inverseOf('a123');
43-
}
4439
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,4 @@ public function rules()
2828
'name_string' => [['name'], 'string', 'max' => 40],
2929
];
3030
}
31-
32-
public function getDomain()
33-
{
34-
return $this->hasOne(\app\models\Domain::class, ['account_id' => 'id'])->inverseOf('account');
35-
}
3631
}

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

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,4 @@ public function getC123()
3636
{
3737
return $this->hasOne(\app\models\C123::class, ['id' => 'c123_id']);
3838
}
39-
40-
public function getA123()
41-
{
42-
return $this->hasOne(\app\models\A123::class, ['b123_id' => 'id'])->inverseOf('b123');
43-
}
44-
45-
public function getE1232()
46-
{
47-
return $this->hasOne(\app\models\E123::class, ['b123_id' => 'id'])->inverseOf('b123');
48-
}
4939
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,4 @@ public function rules()
2727
'name_string' => [['name'], 'string'],
2828
];
2929
}
30-
31-
public function getB123()
32-
{
33-
return $this->hasOne(\app\models\B123::class, ['c123_id' => 'id'])->inverseOf('c123');
34-
}
3530
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,4 @@ public function rules()
2727
'name_string' => [['name'], 'string'],
2828
];
2929
}
30-
31-
public function getRouting()
32-
{
33-
return $this->hasOne(\app\models\Routing::class, ['d123_id' => 'id'])->inverseOf('d123');
34-
}
3530
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,4 @@ public function getRoutings()
4444
{
4545
return $this->hasMany(\app\models\Routing::class, ['domain_id' => 'id'])->inverseOf('domain');
4646
}
47-
48-
public function getRouting()
49-
{
50-
return $this->hasOne(\app\models\Routing::class, ['domain_id' => 'id'])->inverseOf('domain');
51-
}
5247
}

0 commit comments

Comments
 (0)