mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 16:08:55 +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
|
||||
* @dataProvider getInvalidClasses
|
||||
*/
|
||||
public function testInvalidProviderThrowsException()
|
||||
public function testInvalidProviderThrowsException($class)
|
||||
{
|
||||
$client = ClientFactory::create([
|
||||
"adapter" => [
|
||||
"name" => "InvalidClass",
|
||||
"name" => $class,
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
public function getInvalidClasses()
|
||||
{
|
||||
return [["InvalidClass"],["stdClass"]];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user