/** * The constructor. */ function __construct() { $this->response = \App::make('Paxifi\\Support\\Response\\Response'); $this->response->setRequestedScopes(explode(',', \Input::get('embed'))); $this->perPage = \Input::get('count', \Config::get('paxifi.api.pagination.count.default')); $this->paginationEnabled = \Config::get('paxifi.api.pagination.enabled'); parent::__construct(); }
public function testSetRequestedScope() { $response = new Response($fractal = m::mock('League\\Fractal\\Manager'), m::mock('Paxifi\\Support\\Response\\Item'), m::mock('Paxifi\\Support\\Response\\Collection'), m::mock('Paxifi\\Support\\Response\\Paginator'), m::mock('Paxifi\\Support\\Response\\Cursor')); $fractal->shouldReceive('setRequestedScopes')->with(array('foo', 'bar'))->once(); $response->setRequestedScopes(array('foo', 'bar')); }