Skip to content

Commit f7200ef

Browse files
authored
Merge pull request ErickTamayo#3 from shibby/master
updated composer.json dependencies and fixed failed test
2 parents a377d97 + 926ba8c commit f7200ef

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ language: php
22
php:
33
- 7.0
44
- 5.6
5-
- 5.5
6-
- hhvm
75

86
before_script:
97
- travis_retry composer self-update

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"keywords": ["laravel", "scout", "elasticsearch", "elastic"],
55
"require": {
66
"php": ">=5.6.4",
7-
"laravel/scout": "^1.0@dev",
8-
"illuminate/support": "^5.3@dev",
9-
"illuminate/database": "^5.3@dev",
7+
"laravel/scout": "^1.0",
8+
"illuminate/support": "^5.3",
9+
"illuminate/database": "^5.3",
1010
"elasticsearch/elasticsearch": "^2.2"
1111
},
1212
"require-dev": {

tests/ElasticsearchEngineTets.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ public function test_map_correctly_maps_results_to_models()
8282
$engine = new ElasticsearchEngine($client, 'scout');
8383

8484
$model = Mockery::mock('Illuminate\Database\Eloquent\Model');
85-
$model->shouldReceive('getKeyName')->andReturn('key');
86-
$model->shouldReceive('whereIn')->once()->with('key', ['1'])->andReturn($model);
85+
$model->shouldReceive('getKeyName')->andReturn('id');
86+
$model->shouldReceive('whereIn')->once()->with('id', ['1'])->andReturn($model);
8787
$model->shouldReceive('get')->once()->andReturn(Collection::make([new ElasticsearchEngineTestModel]));
8888

8989
$results = $engine->map([
@@ -101,8 +101,13 @@ public function test_map_correctly_maps_results_to_models()
101101
}
102102
}
103103

104-
class ElasticsearchEngineTestModel
104+
class ElasticsearchEngineTestModel extends \Illuminate\Database\Eloquent\Model
105105
{
106+
public function getIdAttribute()
107+
{
108+
return 1;
109+
}
110+
106111
public function searchableAs()
107112
{
108113
return 'table';

0 commit comments

Comments
 (0)