getEnvironment(); $this->serverContext = $environment->getContext(ServerContext::class); $this->boardContext = $environment->getContext('BoardContext'); } /** * @Given /^post a comment with content "([^"]*)" on the card$/ */ public function postACommentWithContentOnTheCard($content) { $card = $this->boardContext->getLastUsedCard(); $this->serverContext->sendOCSRequest('POST', '/apps/deck/api/v1.0/cards/' . $card['id'] . '/comments', [ 'message' => $content, 'parentId' => null ]); } }