mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-02 00:32:09 +02:00
Cover more factory method invalid arguments
This commit is contained in:
@@ -117,13 +117,19 @@ class ClientFactoryTest extends \PHPUnit_Framework_TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @expectedException InvalidArgumentException
|
* @expectedException InvalidArgumentException
|
||||||
|
* @dataProvider getInvalidClasses
|
||||||
*/
|
*/
|
||||||
public function testInvalidProviderThrowsException()
|
public function testInvalidProviderThrowsException($class)
|
||||||
{
|
{
|
||||||
$client = ClientFactory::create([
|
$client = ClientFactory::create([
|
||||||
"adapter" => [
|
"adapter" => [
|
||||||
"name" => "InvalidClass",
|
"name" => $class,
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getInvalidClasses()
|
||||||
|
{
|
||||||
|
return [["InvalidClass"],["stdClass"]];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user