Documentation

CurlHandleTest extends TestCase
in package
uses HttpFactoryTrait

FinalYes
Attributes
#[Group]
'slow'

Table of Contents

Properties

$HTTP_CLIENT_FACTORY  : string

Methods

caInfoFile()  : void
caOptionProvider()  : array<string|int, mixed>
invalidCAException()  : void
largeBody()  : void
requestMethods()  : void
requestMethodsWithFormBody()  : void
requestMethodsWithJsonBody()  : void
createHandle()  : CurlHandle
setUp()  : void

Properties

$HTTP_CLIENT_FACTORY

protected string $HTTP_CLIENT_FACTORY = \chillerlan\HTTPTest\ClientFactories\CurlClientFactory::class

Methods

caInfoFile()

public caInfoFile(string $option, mixed $value, string $expectedPath, int $curl_opt, int $curl_opt_not) : void
Parameters
$option : string
$value : mixed
$expectedPath : string
$curl_opt : int
$curl_opt_not : int
Attributes
#[DataProvider]
'caOptionProvider'
#[Test]

caOptionProvider()

public static caOptionProvider() : array<string|int, mixed>
Return values
array<string|int, mixed>

invalidCAException()

public invalidCAException(string $option, mixed $value) : void
Parameters
$option : string
$value : mixed
Attributes
#[Test]
#[TestWith]
['ca_info', '/foo.pem']
'ca_file'
#[TestWith]
['ca_info', '/foo']
'ca_path'
#[TestWith]
['curl_options', [CURLOPT_CAINFO => '/foo.pem']]
'ca_file, curl_options'
#[TestWith]
['curl_options', [CURLOPT_CAPATH => '/foo']]
'ca_path, curl_options'

requestMethods()

public requestMethods(string $method) : void
Parameters
$method : string
Attributes
#[Test]
#[TestWith]
['DELETE']
'delete'
#[TestWith]
['GET']
'get'
#[TestWith]
['PATCH']
'patch'
#[TestWith]
['POST']
'post'
#[TestWith]
['PUT']
'put'

requestMethodsWithFormBody()

public requestMethodsWithFormBody(string $method) : void
Parameters
$method : string
Attributes
#[Test]
#[TestWith]
['DELETE']
'delete'
#[TestWith]
['PATCH']
'patch'
#[TestWith]
['POST']
'post'
#[TestWith]
['PUT']
'put'

requestMethodsWithJsonBody()

public requestMethodsWithJsonBody(string $method) : void
Parameters
$method : string
Attributes
#[Test]
#[TestWith]
['DELETE']
'delete'
#[TestWith]
['PATCH']
'patch'
#[TestWith]
['POST']
'post'
#[TestWith]
['PUT']
'put'
On this page

Search results