Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
TYPO3
Extensions
lock
Commits
1ee2d466
Commit
1ee2d466
authored
Nov 10, 2017
by
Daniel Hürtgen
Browse files
[FIX] Missing configuration exception test added
parent
12b10243
Changes
2
Hide whitespace changes
Inline
Side-by-side
Classes/Configuration/Configuration.php
View file @
1ee2d466
...
...
@@ -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
),
1510
177680
1510
268834
);
}
$this
->
lockImplementation
=
$lockImplementation
;
...
...
Tests/Unit/Configuration/ConfigurationTest.php
View file @
1ee2d466
...
...
@@ -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
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment