PHP Класс Zendesk\API\UnitTests\BasicTest

Наследование: extends PHPUnit_Framework_TestCase
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$client Zendesk\API\HttpClient
$hostname string
$mockedTransactionsContainer array
$oAuthToken string
$password string
$port string
$scheme string
$subdomain string
$token string

Открытые методы

Метод Описание
__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

Защищенные методы

Метод Описание
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.

Описание методов

__construct() публичный Метод

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

assertEndpointCalled() защищенный Метод

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() публичный Метод

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

assertRequestIs() публичный Метод

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

mockApiResponses() защищенный Метод

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

setUp() защищенный Метод

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

Описание свойств

$client защищенное свойство

protected HttpClient,Zendesk\API $client
Результат Zendesk\API\HttpClient

$hostname защищенное свойство

protected string $hostname
Результат string

$mockedTransactionsContainer защищенное свойство

protected array $mockedTransactionsContainer
Результат array

$oAuthToken защищенное свойство

protected string $oAuthToken
Результат string

$password защищенное свойство

protected string $password
Результат string

$port защищенное свойство

protected string $port
Результат string

$scheme защищенное свойство

protected string $scheme
Результат string

$subdomain защищенное свойство

protected string $subdomain
Результат string

$token защищенное свойство

protected string $token
Результат string