@@ -15,14 +15,14 @@ class PostgresEngineTest extends TestCase
15
15
{
16
16
public function test_it_can_be_instantiated ()
17
17
{
18
- list ( $ engine) = $ this ->getEngine ();
18
+ [ $ engine] = $ this ->getEngine ();
19
19
20
20
$ this ->assertInstanceOf (PostgresEngine::class, $ engine );
21
21
}
22
22
23
23
public function test_update_adds_object_to_index ()
24
24
{
25
- list ( $ engine , $ db) = $ this ->getEngine ();
25
+ [ $ engine , $ db] = $ this ->getEngine ();
26
26
27
27
$ db ->shouldReceive ('query ' )
28
28
->andReturn ($ query = Mockery::mock ('stdClass ' ));
@@ -50,14 +50,14 @@ public function test_update_adds_object_to_index()
50
50
51
51
public function test_update_do_nothing_if_index_maintenance_turned_off_globally ()
52
52
{
53
- list ( $ engine) = $ this ->getEngine (['maintain_index ' => false ]);
53
+ [ $ engine] = $ this ->getEngine (['maintain_index ' => false ]);
54
54
55
55
$ engine ->update (Collection::make ([new TestModel ()]));
56
56
}
57
57
58
58
public function test_delete_removes_object_from_index ()
59
59
{
60
- list ( $ engine , $ db) = $ this ->getEngine ();
60
+ [ $ engine , $ db] = $ this ->getEngine ();
61
61
62
62
$ db ->shouldReceive ('table ' )
63
63
->andReturn ($ table = Mockery::mock ('stdClass ' ));
@@ -72,7 +72,7 @@ public function test_delete_removes_object_from_index()
72
72
73
73
public function test_delete_do_nothing_if_index_maintenance_turned_off_globally ()
74
74
{
75
- list ( $ engine , $ db) = $ this ->getEngine (['maintain_index ' => false ]);
75
+ [ $ engine , $ db] = $ this ->getEngine (['maintain_index ' => false ]);
76
76
77
77
$ db ->shouldNotReceive ('table ' );
78
78
@@ -81,7 +81,7 @@ public function test_delete_do_nothing_if_index_maintenance_turned_off_globally(
81
81
82
82
public function test_flush_removes_all_objects_from_index ()
83
83
{
84
- list ( $ engine , $ db) = $ this ->getEngine ();
84
+ [ $ engine , $ db] = $ this ->getEngine ();
85
85
86
86
$ db ->shouldReceive ('table ' )
87
87
->once ()
@@ -95,7 +95,7 @@ public function test_flush_removes_all_objects_from_index()
95
95
96
96
public function test_flush_does_nothing_if_index_maintenance_turned_off_globally ()
97
97
{
98
- list ( $ engine , $ db) = $ this ->getEngine (['maintain_index ' => false ]);
98
+ [ $ engine , $ db] = $ this ->getEngine (['maintain_index ' => false ]);
99
99
100
100
$ db ->shouldNotReceive ('table ' );
101
101
@@ -104,7 +104,7 @@ public function test_flush_does_nothing_if_index_maintenance_turned_off_globally
104
104
105
105
public function test_search ()
106
106
{
107
- list ( $ engine , $ db) = $ this ->getEngine ();
107
+ [ $ engine , $ db] = $ this ->getEngine ();
108
108
109
109
$ skip = 0 ;
110
110
$ limit = 5 ;
@@ -129,7 +129,7 @@ public function test_search()
129
129
130
130
public function test_search_with_order_by ()
131
131
{
132
- list ( $ engine , $ db) = $ this ->getEngine ();
132
+ [ $ engine , $ db] = $ this ->getEngine ();
133
133
134
134
$ table = $ this ->setDbExpectations ($ db , false );
135
135
@@ -149,7 +149,7 @@ public function test_search_with_order_by()
149
149
150
150
public function test_search_with_global_config ()
151
151
{
152
- list ( $ engine , $ db) = $ this ->getEngine (['config ' => 'simple ' ]);
152
+ [ $ engine , $ db] = $ this ->getEngine (['config ' => 'simple ' ]);
153
153
154
154
$ skip = 0 ;
155
155
$ limit = 5 ;
@@ -170,7 +170,7 @@ public function test_search_with_global_config()
170
170
171
171
public function test_search_with_model_config ()
172
172
{
173
- list ( $ engine , $ db) = $ this ->getEngine (['config ' => 'simple ' ]);
173
+ [ $ engine , $ db] = $ this ->getEngine (['config ' => 'simple ' ]);
174
174
175
175
$ skip = 0 ;
176
176
$ limit = 5 ;
@@ -194,7 +194,7 @@ public function test_search_with_model_config()
194
194
195
195
public function test_search_with_soft_deletes ()
196
196
{
197
- list ( $ engine , $ db) = $ this ->getEngine ();
197
+ [ $ engine , $ db] = $ this ->getEngine ();
198
198
199
199
$ table = $ this ->setDbExpectations ($ db );
200
200
@@ -214,7 +214,7 @@ public function test_search_with_soft_deletes()
214
214
215
215
public function test_maps_results_to_models ()
216
216
{
217
- list ( $ engine) = $ this ->getEngine ();
217
+ [ $ engine] = $ this ->getEngine ();
218
218
219
219
$ model = Mockery::mock ('StdClass ' );
220
220
$ model ->shouldReceive ('getKeyName ' )->andReturn ('id ' );
@@ -232,7 +232,7 @@ public function test_maps_results_to_models()
232
232
233
233
public function test_map_filters_out_no_longer_existing_models ()
234
234
{
235
- list ( $ engine) = $ this ->getEngine ();
235
+ [ $ engine] = $ this ->getEngine ();
236
236
237
237
$ model = Mockery::mock ('StdClass ' );
238
238
$ model ->shouldReceive ('getKeyName ' )->andReturn ('id ' );
@@ -255,7 +255,7 @@ public function test_map_filters_out_no_longer_existing_models()
255
255
256
256
public function test_it_returns_total_count ()
257
257
{
258
- list ( $ engine) = $ this ->getEngine ();
258
+ [ $ engine] = $ this ->getEngine ();
259
259
260
260
$ count = $ engine ->getTotalCount (
261
261
json_decode ('[{"id": 1, "tsrank": 0.33, "total_count": 100}] ' )
@@ -266,7 +266,7 @@ public function test_it_returns_total_count()
266
266
267
267
public function test_map_ids_returns_right_key ()
268
268
{
269
- list ( $ engine , $ db) = $ this ->getEngine ();
269
+ [ $ engine , $ db] = $ this ->getEngine ();
270
270
271
271
$ table = $ this ->setDbExpectations ($ db );
272
272
$ table ->shouldReceive ('getBindings ' )->andReturn ([null , 'foo ' ]);
0 commit comments