PHP Class Zendesk\API\LiveTests\TicketsTest

Inheritance: extends Zendesk\API\LiveTests\BasicTest
Show file Open project: zendesk/zendesk_api_client_php

Public Methods

Method Description
testAssignTicketToGroup ( ) Test if a ticket with a group_id is assigned to the correct group.
testCollaborators ( $ticket ) Tests if the client can call and build the ticket collaborators endpoint with the correct ID
testCreateTicket ( ) Test creating of ticket
testCreateWithAttachment ( ) Tests if the client can call and build the create ticket witch attachment endpoint and initiate the file upload headers and POST data
testDelete ( $ticket ) Tests if the client can call and build the delete tickets endpoint This will throw an exception if it fails
testDeleteMultiple ( $ticket ) Tests if the client can call and build the delete many tickets endpoint with the correct IDs
testFindAll ( $ticket ) Tests if the client can call and build the tickets endpoint with the proper sideloads
testFindMultiple ( $ticket ) Tests if the client can call and build the show many tickets endpoint with the correct IDs
testFindSingle ( $ticket ) Tests if the client can call and build the find ticket endpoint
testHandlesApiException ( ) Test we can handle api exceptions, by finding a non-existing ticket
testIncidents ( ) Tests if the client can call and build the tickets incidents endpoint with the correct ID
testRelated ( $ticket ) Tests if the client can call and build the related tickets endpoint with the correct ID
testUpdate ( $ticket ) Tests if the client can update tickets
testUpdateManyWithQueryParams ( $ticket ) Tests if the client can call and build the update many tickets endpoint with the correct IDS and POST fields

Private Methods

Method Description
createTestTicket ( array $extraParams = [] ) : mixed Create a test ticket

Method Details

testAssignTicketToGroup() public method

Test if a ticket with a group_id is assigned to the correct group.

testCollaborators() public method

Tests if the client can call and build the ticket collaborators endpoint with the correct ID
public testCollaborators ( $ticket )

testCreateTicket() public method

Test creating of ticket
public testCreateTicket ( )

testCreateWithAttachment() public method

Tests if the client can call and build the create ticket witch attachment endpoint and initiate the file upload headers and POST data

testDelete() public method

Tests if the client can call and build the delete tickets endpoint This will throw an exception if it fails
public testDelete ( $ticket )

testDeleteMultiple() public method

Tests if the client can call and build the delete many tickets endpoint with the correct IDs
public testDeleteMultiple ( $ticket )

testFindAll() public method

Tests if the client can call and build the tickets endpoint with the proper sideloads
public testFindAll ( $ticket )

testFindMultiple() public method

Tests if the client can call and build the show many tickets endpoint with the correct IDs
public testFindMultiple ( $ticket )

testFindSingle() public method

Tests if the client can call and build the find ticket endpoint
public testFindSingle ( $ticket )

testHandlesApiException() public method

Test we can handle api exceptions, by finding a non-existing ticket

testIncidents() public method

Tests if the client can call and build the tickets incidents endpoint with the correct ID
public testIncidents ( )

testRelated() public method

Tests if the client can call and build the related tickets endpoint with the correct ID
public testRelated ( $ticket )

testUpdate() public method

Tests if the client can update tickets
public testUpdate ( $ticket )

testUpdateManyWithQueryParams() public method

Tests if the client can call and build the update many tickets endpoint with the correct IDS and POST fields
public testUpdateManyWithQueryParams ( $ticket )