public function testConstructWithEmptyData() { $item = new Item(); $this->assertEmpty($item->getData()); $this->assertEquals(function () { }, $item->getTransformer()); }
/** * Responds with single resource. * * @return array */ public function withItem() { $this->item->setData($this->content); $this->item->setTransformer($this->transformer); return $this->fractal->createData($this->item)->toArray(); }