예제 #1
0
 public function testConstructWithEmptyData()
 {
     $item = new Item();
     $this->assertEmpty($item->getData());
     $this->assertEquals(function () {
     }, $item->getTransformer());
 }
예제 #2
0
 /**
  * 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();
 }