summaryrefslogtreecommitdiff
path: root/tests/Unit/Http
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Unit/Http')
-rw-r--r--tests/Unit/Http/GuzzleServiceProviderTest.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/Unit/Http/GuzzleServiceProviderTest.php b/tests/Unit/Http/GuzzleServiceProviderTest.php
new file mode 100644
index 00000000..4d3c938b
--- /dev/null
+++ b/tests/Unit/Http/GuzzleServiceProviderTest.php
@@ -0,0 +1,29 @@
+<?php
+
+namespace Engelsystem\Test\Unit\Http;
+
+use Engelsystem\Application;
+use Engelsystem\Http\GuzzleServiceProvider;
+use Engelsystem\Test\Unit\ServiceProviderTest;
+use GuzzleHttp\Client as GuzzleClient;
+
+class GuzzleServiceProviderTest extends ServiceProviderTest
+{
+ /**
+ * @covers \Engelsystem\Http\GuzzleServiceProvider::register
+ */
+ public function testRegister()
+ {
+ $app = new Application();
+
+ $serviceProvider = new GuzzleServiceProvider($app);
+ $serviceProvider->register();
+
+ /** @var GuzzleClient $guzzle */
+ $guzzle = $app->make(GuzzleClient::class);
+ $config = $guzzle->getConfig();
+
+ $this->assertFalse($config['http_errors']);
+ $this->assertArrayHasKey('timeout', $config);
+ }
+}