@@ -55,7 +55,7 @@ public function test_sheets_all()
55
55
$ valueRange ->setValues ([['test1 ' => '1 ' ], ['test2 ' => '2 ' ]]);
56
56
$ response ->setValueRanges ([$ valueRange ]);
57
57
58
- $ this ->values ->shouldReceive ('batchGet ' )->with (m::any (), m::any ())->once ()->andReturn ($ response );
58
+ $ this ->values ->expects ('batchGet ' )->with (m::any (), m::any ())->once ()->andReturn ($ response );
59
59
60
60
$ values = $ this ->sheet ->spreadsheet ('test ' )
61
61
->sheet ('test ' )
@@ -75,7 +75,7 @@ public function test_sheets_empty()
75
75
$ valueRange ->setValues (null );
76
76
$ response ->setValueRanges ([$ valueRange ]);
77
77
78
- $ this ->values ->shouldReceive ('batchGet ' )->with (m::any (), m::any ())->once ()->andReturn ($ response );
78
+ $ this ->values ->expects ('batchGet ' )->with (m::any (), m::any ())->once ()->andReturn ($ response );
79
79
80
80
$ values = $ this ->sheet ->all ();
81
81
@@ -89,7 +89,7 @@ public function test_sheets_get()
89
89
$ valueRange ->setValues ([['test1 ' => '1 ' ], ['test2 ' => '2 ' ]]);
90
90
$ response ->setValueRanges ([$ valueRange ]);
91
91
92
- $ this ->values ->shouldReceive ('batchGet ' )->with (m::any (), m::any ())->once ()->andReturn ($ response );
92
+ $ this ->values ->expects ('batchGet ' )->with (m::any (), m::any ())->once ()->andReturn ($ response );
93
93
94
94
$ values = $ this ->sheet ->get ();
95
95
@@ -101,7 +101,7 @@ public function test_sheets_update()
101
101
{
102
102
$ response = new BatchUpdateValuesResponse ;
103
103
104
- $ this ->values ->shouldReceive ('batchUpdate ' )->once ()->andReturn ($ response );
104
+ $ this ->values ->expects ('batchUpdate ' )->once ()->andReturn ($ response );
105
105
106
106
$ values = $ this ->sheet ->sheet ('test ' )->range ('A1 ' )->update ([['test ' ]]);
107
107
@@ -116,7 +116,7 @@ public function test_sheets_first()
116
116
$ valueRange ->setValues ([['test1 ' => '1 ' ], ['test2 ' => '2 ' ]]);
117
117
$ response ->setValueRanges ([$ valueRange ]);
118
118
119
- $ this ->values ->shouldReceive ('batchGet ' )->with (m::any (), m::any ())->once ()->andReturn ($ response );
119
+ $ this ->values ->expects ('batchGet ' )->with (m::any (), m::any ())->once ()->andReturn ($ response );
120
120
121
121
$ value = $ this ->sheet ->first ();
122
122
@@ -130,7 +130,7 @@ public function test_sheets_first_empty()
130
130
$ valueRange ->setValues (null );
131
131
$ response ->setValueRanges ([$ valueRange ]);
132
132
133
- $ this ->values ->shouldReceive ('batchGet ' )->with (m::any (), m::any ())->once ()->andReturn ($ response );
133
+ $ this ->values ->expects ('batchGet ' )->with (m::any (), m::any ())->once ()->andReturn ($ response );
134
134
135
135
$ value = $ this ->sheet ->first ();
136
136
@@ -139,7 +139,7 @@ public function test_sheets_first_empty()
139
139
140
140
public function test_sheets_clear ()
141
141
{
142
- $ this ->values ->shouldReceive ('clear ' )->once ();
142
+ $ this ->values ->expects ('clear ' )->once ();
143
143
144
144
$ value = $ this ->sheet ->clear ();
145
145
@@ -154,7 +154,7 @@ public function test_sheets_append()
154
154
$ valueRange ->setValues ([['test1 ' => '1 ' ], ['test2 ' => '2 ' ]]);
155
155
$ response ->setUpdates ($ updates );
156
156
157
- $ this ->values ->shouldReceive ('append ' )->once ()->andReturn ($ response );
157
+ $ this ->values ->expects ('append ' )->once ()->andReturn ($ response );
158
158
159
159
$ value = $ this ->sheet ->append ([[]]);
160
160
@@ -168,7 +168,7 @@ public function test_sheets_append_with_keys()
168
168
$ valueRange ->setValues ([['header1 ' , 'header2 ' ], ['value1 ' , 'value2 ' ]]);
169
169
$ response ->setValueRanges ([$ valueRange ]);
170
170
171
- $ this ->values ->shouldReceive ('batchGet ' )
171
+ $ this ->values ->expects ('batchGet ' )
172
172
->with (m::any (), m::any ())
173
173
->andReturn ($ response );
174
174
@@ -178,7 +178,7 @@ public function test_sheets_append_with_keys()
178
178
179
179
public function test_spreadsheet_properties ()
180
180
{
181
- $ this ->spreadsheets ->shouldReceive ('get->getProperties->toSimpleObject ' )->once ()->andReturn (new \stdClass );
181
+ $ this ->spreadsheets ->expects ('get->getProperties->toSimpleObject ' )->once ()->andReturn (new \stdClass );
182
182
183
183
$ properties = $ this ->sheet ->spreadsheetProperties ();
184
184
@@ -188,9 +188,9 @@ public function test_spreadsheet_properties()
188
188
public function test_sheet_properties ()
189
189
{
190
190
$ sheet = m::mock (Spreadsheet::class);
191
- $ sheet ->shouldReceive ('getProperties->toSimpleObject ' )->once ()->andReturn (new \stdClass );
191
+ $ sheet ->expects ('getProperties->toSimpleObject ' )->once ()->andReturn (new \stdClass );
192
192
193
- $ this ->spreadsheets ->shouldReceive ('get->getSheets ' )->once ()->andReturn ([$ sheet ]);
193
+ $ this ->spreadsheets ->expects ('get->getSheets ' )->once ()->andReturn ([$ sheet ]);
194
194
195
195
$ properties = $ this ->sheet ->sheetProperties ();
196
196
@@ -213,7 +213,7 @@ public function test_sheets_list()
213
213
],
214
214
]);
215
215
216
- $ this ->spreadsheets ->shouldReceive ('get->getSheets ' )->andReturn ([$ sheets ]);
216
+ $ this ->spreadsheets ->expects ('get->getSheets ' )->andReturn ([$ sheets ]);
217
217
$ values = $ this ->sheet ->sheetList ();
218
218
219
219
$ this ->assertSame (['sheetId ' => 'title ' ], $ values );
@@ -230,7 +230,7 @@ public function test_sheet_by_id()
230
230
231
231
$ sheet = m::mock (SheetsClient::class)->makePartial ();
232
232
233
- $ sheet ->shouldReceive ('sheetList ' )->andReturn ([$ sheets ]);
233
+ $ sheet ->expects ('sheetList ' )->andReturn ([$ sheets ]);
234
234
235
235
$ sheet ->sheetById ('sheetId ' );
236
236
@@ -245,7 +245,7 @@ public function test_spreadsheet_by_title()
245
245
246
246
$ sheet = m::mock (SheetsClient::class)->makePartial ();
247
247
248
- $ sheet ->shouldReceive ('spreadsheetList ' )->andReturn ($ list );
248
+ $ sheet ->expects ('spreadsheetList ' )->andReturn ($ list );
249
249
250
250
$ sheet ->spreadsheetByTitle ('title ' );
251
251
@@ -278,7 +278,7 @@ public function test_get_client()
278
278
public function test_add_sheet ()
279
279
{
280
280
$ this ->spreadsheets
281
- ->shouldReceive ('batchUpdate ' )
281
+ ->expects ('batchUpdate ' )
282
282
->andReturn (new BatchUpdateSpreadsheetResponse );
283
283
284
284
$ response = $ this ->sheet ->addSheet ('new sheet ' );
@@ -294,20 +294,19 @@ public function test_delete_sheet()
294
294
],
295
295
]);
296
296
297
- $ this ->spreadsheets ->shouldReceive ('get->getSheets ' )->andReturn ([$ sheets ]);
297
+ $ this ->spreadsheets ->expects ('get->getSheets ' )->andReturn ([$ sheets ]);
298
298
$ this ->spreadsheets
299
- ->shouldReceive ('batchUpdate ' )
299
+ ->expects ('batchUpdate ' )
300
300
->andReturn (new BatchUpdateSpreadsheetResponse );
301
301
302
- $ this ->sheet ->shouldReceive ('sheetList ' )->andReturn ([$ sheets ]);
303
302
$ response = $ this ->sheet ->deleteSheet ('title ' );
304
303
$ this ->assertNotNull ($ response );
305
304
}
306
305
307
306
public function test_get_proper_ranges ()
308
307
{
309
308
$ this ->values
310
- ->shouldReceive ('batchUpdate ' )
309
+ ->expects ('batchUpdate ' )
311
310
->times (3 )
312
311
->andReturn (new BatchUpdateValuesResponse );
313
312
0 commit comments