public function testGetPayload() { $_SERVER['REQUEST_URI'] = '/_ID_'; $_SERVER[Server::GITHUB_EVENT_HEADER_NAME] = HookManager::EVENT_PING; $_SERVER['CONTENT_TYPE'] = 'application/x-www-form-urlencoded'; $_POST['payload'] = json_encode(array('dummy' => 1)); $this->assertTrue($this->server->getPayload() instanceof Payload); $this->assertEquals($this->server->getPayload()->getContent(), array('dummy' => 1)); // access to php://input could not be tested }