Skip to content

Commit

Permalink
Updating to the latest Fractal.
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Lewis <[email protected]>
  • Loading branch information
jasonlewis committed May 28, 2014
1 parent 64649a6 commit 65b453c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Transformer/FractalTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ protected function createResource($response, $transformer)
}

/**
* Parse includes
* Parse includes.
*
* @return void
*/
protected function parseIncludes()
{
$scopes = array_filter(explode($this->includeSeparator, $this->request->get($this->includeKey)));
$includes = array_filter(explode($this->includeSeparator, $this->request->get($this->includeKey)));

$this->fractal->parseIncludes($scopes);
$this->fractal->parseIncludes($includes);
}

}
1 change: 0 additions & 1 deletion tests/TransformerFractalTransformerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ public function testTransformingCollectionUsingCallback()

public function testTransformingNestedRelationships()
{
$this->transformerFactory->transform('Bar', 'BarTransformerStub');
$this->transformerFactory->setRequest(Illuminate\Http\Request::create('/', 'GET', ['include' => 'foo']));
$this->assertEquals(['data' => ['bar' => 'baz', 'foo' => ['data' => ['foo' => 'bar']]]], $this->transformerFactory->transformResponse(new Bar));
}
Expand Down
2 changes: 2 additions & 0 deletions tests/stubs.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,10 @@ class Foo {
}

class Bar implements Dingo\Api\Transformer\TransformableInterface {

public function getTransformer()
{
return new BarTransformerStub;
}

}

0 comments on commit 65b453c

Please sign in to comment.