SMSFlyTestSource

Extends \SMSFlySource

Source class for tests

package

Default

Methods

Constructor

__construct(array $config = array(), \HttpSourceConnection $Connection = null) 
inherited
throws

Arguments

$config

array

$Connection

\HttpSourceConnection

{@inheritdoc}

_extractResult(\Model $model, array $result, string $requestMethod, boolean $force = true) : array
inherited

Arguments

$model

\Model

$result

array

$requestMethod

string

$force

boolean

Response

array

Sends HttpSocket requests. Builds your uri and formats the response too.

request(\Model $model = null, mixed $requestData = null, string $requestMethod = \HttpSource::METHOD_READ) : array|false
inherited

Arguments

$model

\Model

Model object

$requestData

mixed

Array of request or string uri

$requestMethod

string

read, create, update, delete

Response

array|false

$response

Method for inject mocked connection

setConnection(\HttpSourceConnection $Connection) 

Arguments

$Connection

\HttpSourceConnection

Constants

Http methods constants

HTTP_METHOD_READ
inherited

HTTP_METHOD_CREATE

HTTP_METHOD_CREATE
inherited

HTTP_METHOD_UPDATE

HTTP_METHOD_UPDATE
inherited

HTTP_METHOD_DELETE

HTTP_METHOD_DELETE
inherited

HTTP_METHOD_CHECK

HTTP_METHOD_CHECK
inherited

Properties

The description of this data source

description : string
inherited
var

Type(s)

string