You are here

class AcsfMessageUnitTestSuccess in Acquia Cloud Site Factory Connector 8

Same name and namespace in other branches
  1. 8.2 tests/AcsfMessageUnitTestSuccess.inc \AcsfMessageUnitTestSuccess

AcsfMessageUnitTestSuccess.

Hierarchy

Expanded class hierarchy of AcsfMessageUnitTestSuccess

File

tests/AcsfMessageUnitTestSuccess.inc, line 8

View source
class AcsfMessageUnitTestSuccess extends AcsfMessage {

  /**
   * Implements AcsfMessage::sendMessage().
   */
  protected function sendMessage($url, $method, $endpoint, array $parameters, $username, $password) {
    $response = json_encode([
      'url' => $url,
      'method' => $method,
      'endpoint' => $endpoint,
      'parameters' => $parameters,
      'username' => $username,
      'password' => $password,
    ]);
    return new AcsfMessageResponseUnitTest($endpoint, 0, $response);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AcsfMessage::$ahEnv protected property An optional Acquia Hosting environment.
AcsfMessage::$ahSite protected property An optional Acquia Hosting sitegroup.
AcsfMessage::$config private property An optional AcsfConfig object.
AcsfMessage::$endpoint protected property The message endpoint on the remote server.
AcsfMessage::$parameters protected property An unstructured list of parameters to send with the request.
AcsfMessage::$response protected property The AcsfMessageResponse object.
AcsfMessage::getResponseBody public function Retrieves the response body.
AcsfMessage::getResponseCode public function Retrieves the response code.
AcsfMessage::receiveResponse protected function Allows client code to optionally run logic after the response is received.
AcsfMessage::send public function Sends the message to the remote server.
AcsfMessage::__construct public function Constructor. 1
AcsfMessageUnitTestSuccess::sendMessage protected function Implements AcsfMessage::sendMessage(). Overrides AcsfMessage::sendMessage