예제 #1
0
 function it_perform_create_action(ProductCreateAction $create)
 {
     $data = [];
     $create->execute()->willReturn($data);
     $this->createAction()->shouldBeRestViewWith(['data' => $data, 'statusCode' => Codes::HTTP_CREATED, 'serializationGroups' => ['product_create'], 'headers' => ['cache-control' => ['no-cache'], 'date' => ["@string@.isDateTime()"]]]);
 }
예제 #2
0
 /**
  * @return \FOS\RestBundle\View\View|null
  */
 public function createAction()
 {
     return $this->renderRestView($this->create->execute(), Codes::HTTP_CREATED, [], ['product_create']);
 }