Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LQDN Adminsys
don
Commits
cbbbadbb
Commit
cbbbadbb
authored
Oct 13, 2018
by
Okhin
Browse files
Fixed the generic object test
parent
5572b798
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/LQDN/CommandHandler.php
View file @
cbbbadbb
...
...
@@ -19,7 +19,11 @@ class CommandHandler
*/
public
function
handle
(
$command
)
{
$method
=
$this
->
getHandleMethod
(
$command
);
try
{
$method
=
$this
->
getHandleMethod
(
$command
);
}
catch
(
Exception
$e
)
{
throw
new
CommandNotHandledException
();
}
foreach
(
$this
->
handlers
as
$handler
)
{
if
(
method_exists
(
$handler
,
$method
))
{
...
...
tests/functional/Handler/CommandHandlerTest.php
View file @
cbbbadbb
...
...
@@ -16,7 +16,7 @@ class CommandHandlerTest extends Functionaltest
public
function
testCommandNotHandledException
()
{
$this
->
setExpectedException
(
'LQDN\Exception\CommandNotHandledException'
);
$this
->
container
[
'command_handler'
]
->
handle
(
new
Object
()
);
$this
->
container
[
'command_handler'
]
->
handle
(
new
class
{}
);
}
}
...
...
Write
Preview
Supports
Markdown
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