Commit ba86fcec authored by Jens Segers's avatar Jens Segers

Add mockery to composer.json

parent f249b3be
......@@ -18,7 +18,6 @@ before_script:
- mysql -e 'create database unittest;'
- composer self-update
- composer require satooshi/php-coveralls:dev-master
- composer require mockery/mockery:dev-master
- composer install --dev --no-interaction
script:
......
......@@ -17,7 +17,8 @@
},
"require-dev": {
"illuminate/cache": "4.1.x",
"illuminate/auth": "4.1.x"
"illuminate/auth": "4.1.x",
"mockery/mockery": "*"
},
"autoload": {
"psr-0": {
......
......@@ -142,9 +142,11 @@ class EmbedsMany extends Relation {
public function find(array $ids)
{
$documents = $this->getEmbeddedRecords();
$primaryKey = $this->related->getKeyName();
$documents = array_filter($documents, function ($document) use($primaryKey, $ids) {
$documents = array_filter($documents, function ($document) use ($primaryKey, $ids)
{
return in_array($document[$primaryKey], $ids);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment