You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
787 B
PHTML
30 lines
787 B
PHTML
5 years ago
|
<?php
|
||
|
|
||
|
namespace Engelsystem\Test\Unit\Http;
|
||
|
|
||
|
use Engelsystem\Application;
|
||
5 years ago
|
use Engelsystem\Http\HttpClientServiceProvider;
|
||
5 years ago
|
use Engelsystem\Test\Unit\ServiceProviderTest;
|
||
|
use GuzzleHttp\Client as GuzzleClient;
|
||
|
|
||
5 years ago
|
class HttpClientServiceProviderTest extends ServiceProviderTest
|
||
5 years ago
|
{
|
||
|
/**
|
||
5 years ago
|
* @covers \Engelsystem\Http\HttpClientServiceProvider::register
|
||
5 years ago
|
*/
|
||
|
public function testRegister()
|
||
|
{
|
||
|
$app = new Application();
|
||
|
|
||
5 years ago
|
$serviceProvider = new HttpClientServiceProvider($app);
|
||
5 years ago
|
$serviceProvider->register();
|
||
|
|
||
|
/** @var GuzzleClient $guzzle */
|
||
|
$guzzle = $app->make(GuzzleClient::class);
|
||
|
$config = $guzzle->getConfig();
|
||
|
|
||
|
$this->assertFalse($config['http_errors']);
|
||
|
$this->assertArrayHasKey('timeout', $config);
|
||
|
}
|
||
|
}
|