@@ -35,7 +35,6 @@ protected function setUp(): void
35
35
public function testActiveQuery ()
36
36
{
37
37
$ provider = new ActiveDataProvider ([
38
- 'db ' => $ this ->getConnection (),
39
38
'query ' => Order::find ()->orderBy ('id ' ),
40
39
]);
41
40
$ orders = $ provider ->getModels ();
@@ -46,7 +45,6 @@ public function testActiveQuery()
46
45
$ this ->assertEquals ([1 , 2 , 3 ], $ provider ->getKeys ());
47
46
48
47
$ provider = new ActiveDataProvider ([
49
- 'db ' => $ this ->getConnection (),
50
48
'query ' => Order::find (),
51
49
'pagination ' => [
52
50
'pageSize ' => 2 ,
@@ -61,7 +59,6 @@ public function testActiveRelation()
61
59
/* @var $customer Customer */
62
60
$ customer = Customer::findOne (2 );
63
61
$ provider = new ActiveDataProvider ([
64
- 'db ' => $ this ->getConnection (),
65
62
'query ' => $ customer ->getOrders (),
66
63
]);
67
64
$ orders = $ provider ->getModels ();
@@ -71,7 +68,6 @@ public function testActiveRelation()
71
68
$ this ->assertEquals ([2 , 3 ], $ provider ->getKeys ());
72
69
73
70
$ provider = new ActiveDataProvider ([
74
- 'db ' => $ this ->getConnection (),
75
71
'query ' => $ customer ->getOrders (),
76
72
'pagination ' => [
77
73
'pageSize ' => 1 ,
@@ -86,7 +82,6 @@ public function testActiveRelationVia()
86
82
/* @var $order Order */
87
83
$ order = Order::findOne (2 );
88
84
$ provider = new ActiveDataProvider ([
89
- 'db ' => $ this ->getConnection (),
90
85
'query ' => $ order ->getItems (),
91
86
]);
92
87
$ items = $ provider ->getModels ();
@@ -97,7 +92,6 @@ public function testActiveRelationVia()
97
92
$ this ->assertEquals ([3 , 4 , 5 ], $ provider ->getKeys ());
98
93
99
94
$ provider = new ActiveDataProvider ([
100
- 'db ' => $ this ->getConnection (),
101
95
'query ' => $ order ->getItems (),
102
96
'pagination ' => [
103
97
'pageSize ' => 2 ,
@@ -112,7 +106,6 @@ public function testActiveRelationViaTable()
112
106
/* @var $order Order */
113
107
$ order = Order::findOne (1 );
114
108
$ provider = new ActiveDataProvider ([
115
- 'db ' => $ this ->getConnection (),
116
109
'query ' => $ order ->getBooks (),
117
110
]);
118
111
$ items = $ provider ->getModels ();
0 commit comments