PHP Class Zendesk\API\UnitTests\BasicTest

Inheritance: extends PHPUnit_Framework_TestCase
Afficher le fichier Open project: zendesk/zendesk_api_client_php Class Usage Examples

Protected Properties

Свойство Type Description
$client Zendesk\API\HttpClient
$hostname string
$mockedTransactionsContainer array
$oAuthToken string
$password string
$port string
$scheme string
$subdomain string
$token string

Méthodes publiques

Méthode Description
__construct ( $name = null, array $data = [], $dataName = '' )
assertLastRequestIs ( $options ) This checks the last request sent
assertRequestIs ( $options, integer $index ) This checks the response with the given index

Méthodes protégées

Méthode Description
assertEndpointCalled ( $userFunction, $endpoint, string $method = 'GET', $additionalAsserts = [] ) Test for the endpoint using the given method and endpoint
mockApiResponses ( array $responses = [] ) This will mock the next responses sent via guzzle
setUp ( ) Sets up the fixture, for example, open a network connection.

Method Details

__construct() public méthode

public __construct ( $name = null, array $data = [], $dataName = '' )
$data array

assertEndpointCalled() protected méthode

Test for the endpoint using the given method and endpoint
protected assertEndpointCalled ( $userFunction, $endpoint, string $method = 'GET', $additionalAsserts = [] )
$userFunction
$endpoint - An array containing [request method, endpoint path]
$method string

assertLastRequestIs() public méthode

This checks the last request sent
public assertLastRequestIs ( $options )
$options

assertRequestIs() public méthode

This checks the response with the given index
public assertRequestIs ( $options, integer $index )
$options
$index integer

mockApiResponses() protected méthode

This will mock the next responses sent via guzzle
protected mockApiResponses ( array $responses = [] )
$responses array An array of GuzzleHttp\Psr7\Response objects

setUp() protected méthode

This method is called before a test is executed.
protected setUp ( )

Property Details

$client protected_oe property

protected HttpClient,Zendesk\API $client
Résultat Zendesk\API\HttpClient

$hostname protected_oe property

protected string $hostname
Résultat string

$mockedTransactionsContainer protected_oe property

protected array $mockedTransactionsContainer
Résultat array

$oAuthToken protected_oe property

protected string $oAuthToken
Résultat string

$password protected_oe property

protected string $password
Résultat string

$port protected_oe property

protected string $port
Résultat string

$scheme protected_oe property

protected string $scheme
Résultat string

$subdomain protected_oe property

protected string $subdomain
Résultat string

$token protected_oe property

protected string $token
Résultat string