Commit 1ee2d466 authored by Daniel Hürtgen's avatar Daniel Hürtgen

[FIX] Missing configuration exception test added

parent 12b10243
......@@ -169,7 +169,7 @@ class Configuration implements SingletonInterface
if (! is_a($lockImplementation, LockInterface::class, true)) {
throw new InvalidLockImplementationException(
sprintf('%s only accepts classes extending the %s class', __METHOD__, LockInterface::class),
1510177680
1510268834
);
}
$this->lockImplementation = $lockImplementation;
......
......@@ -294,4 +294,18 @@ class ConfigurationTest extends UnitTestCase
$this->assertNull($sut->getLockImplementation());
}
/**
* @test
* @expectedException \Higidi\Lock\Configuration\Exception\InvalidLockImplementationException
* @expectedExceptionCode 1510268834
*/
public function itThrowsAnInvalidLockImplementationExceptionIfLockImplementionDoNotImplementTheLockingInterface()
{
$configuration = [
'lockImplementation' => \stdClass::class,
];
new Configuration($configuration);
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment