Skip to content
Snippets Groups Projects
Commit 8be0434c authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

Merge branch 'feature/first-release' into 'master'

Feature/first release

See merge request !1
parents 5a7d23b1 d87320de
No related branches found
No related tags found
1 merge request!1Feature/first release
Pipeline #4889 failed
<?php
class TestHttpClientFactory extends \PHPUnit\Framework\TestCase
{
/**
* Test createClient method.
*/
public function testCreateClient()
{
$options = Mockery::mock(\WPDesk\HttpClient\HttpClientOptions::class);
$options->shouldReceive('getHttpClientClass')
->withAnyArgs()
->andReturn(\WPDesk\HttpClient\Curl\CurlClient::class);
$factory = new \WPDesk\HttpClient\HttpClientFactory();
$client = $factory->createClient($options);
$this->assertInstanceOf(\WPDesk\HttpClient\Curl\CurlClient::class, $client);
}
}
\ No newline at end of file
<?php
/**
* PHPUnit bootstrap file
*/
require_once __DIR__ . '/../../vendor/autoload.php';
WP_Mock::setUsePatchwork( true );
WP_Mock::bootstrap();
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment