From b02a52e2f76361e17518bf0b3c7cf2e97518a274 Mon Sep 17 00:00:00 2001 From: Walter Dal Mut Date: Tue, 23 Jun 2015 20:49:44 +0200 Subject: [PATCH] Cover missing class on factory method --- tests/unit/ClientFactoryTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/unit/ClientFactoryTest.php b/tests/unit/ClientFactoryTest.php index a7f0e44f19..91031eb5da 100644 --- a/tests/unit/ClientFactoryTest.php +++ b/tests/unit/ClientFactoryTest.php @@ -114,4 +114,16 @@ class ClientFactoryTest extends \PHPUnit_Framework_TestCase ["InfluxDB\\Adapter\\GuzzleAdapter"], ]; } + + /** + * @expectedException InvalidArgumentException + */ + public function testInvalidProviderThrowsException() + { + $client = ClientFactory::create([ + "adapter" => [ + "name" => "InvalidClass", + ], + ]); + } }