2
2
3
3
namespace ScoutElastic \Tests ;
4
4
5
- use Illuminate \Support \Facades \Artisan ;
6
5
use Mockery ;
7
6
use ScoutElastic \Console \ElasticIndexCreateCommand ;
8
7
use ScoutElastic \Console \ElasticIndexDropCommand ;
9
8
use ScoutElastic \Console \ElasticIndexUpdateCommand ;
10
9
use ScoutElastic \Console \ElasticMigrateCommand ;
11
10
use ScoutElastic \Console \ElasticUpdateMappingCommand ;
12
- use ScoutElastic \ElasticEngine ;
13
11
use ScoutElastic \Tests \Stubs \IndexConfiguratorStub ;
14
12
use ScoutElastic \Tests \Stubs \ModelStub ;
15
13
@@ -19,8 +17,11 @@ private function fireCommand($class, array $arguments)
19
17
{
20
18
$ command = Mockery::mock ($ class )
21
19
->makePartial ()
20
+
22
21
->shouldReceive ('line ' )
23
- ->andReturnNull ()
22
+ ->getMock ()
23
+
24
+ ->shouldReceive ('call ' )
24
25
->getMock ();
25
26
26
27
foreach ($ arguments as $ key => $ value ) {
@@ -217,14 +218,6 @@ public function test_if_the_update_mapping_command_builds_correct_response()
217
218
218
219
public function test_if_the_migrate_command_builds_correct_payload_for_new_target_index ()
219
220
{
220
- Mockery::mock ('alias: ' . Artisan::class)
221
- ->makePartial ()
222
- ->shouldReceive ('call ' )
223
- ->with (
224
- 'scout:import ' ,
225
- ['model ' => ModelStub::class]
226
- );
227
-
228
221
$ this ->mockClient ()
229
222
230
223
->shouldReceive ('indices ' )
@@ -356,14 +349,6 @@ public function test_if_the_migrate_command_builds_correct_payload_for_new_targe
356
349
357
350
public function test_if_the_migrate_command_builds_correct_payload_for_existing_target_index ()
358
351
{
359
- Mockery::mock ('alias: ' . Artisan::class)
360
- ->makePartial ()
361
- ->shouldReceive ('call ' )
362
- ->with (
363
- 'scout:import ' ,
364
- ['model ' => ModelStub::class]
365
- );
366
-
367
352
$ this ->mockClient ()
368
353
369
354
->shouldReceive ('indices ' )
0 commit comments