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()"]]]); }
/** * @return \FOS\RestBundle\View\View|null */ public function createAction() { return $this->renderRestView($this->create->execute(), Codes::HTTP_CREATED, [], ['product_create']); }