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
5572b798
Commit
5572b798
authored
Oct 13, 2018
by
Okhin
Browse files
Test for the CommandHandler
parent
f67edd27
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/functional/Handler/AddressHandlerTest.php
View file @
5572b798
...
...
@@ -10,7 +10,7 @@ use LQDN\Tests\Functional\FunctionalTest;
class
AddressHandlerTest
extends
FunctionalTest
{
public
function
no
testAddressUsedDelete
()
public
function
testAddressUsedDelete
()
{
$this
->
assertTrue
(
$this
->
addressExists
(
1
));
...
...
@@ -27,7 +27,7 @@ class AddressHandlerTest extends FunctionalTest
$this
->
assertFalse
(
$this
->
addressExists
(
2
));
}
public
function
no
testAddressUpdate
()
public
function
testAddressUpdate
()
{
$this
->
assertTrue
(
$this
->
addressExists
(
1
));
$this
->
assertTrue
(
$this
->
isDefaultAddress
(
1
));
...
...
tests/functional/Handler/CommandHandlerTest.php
0 → 100644
View file @
5572b798
<?php
namespace
LQDN\Tests\Functionnal\Handler
;
use
LQDN\CommandHandler
;
use
LQDN\Tests\Functional\FunctionalTest
;
class
CommandHandlerTest
extends
Functionaltest
{
public
function
testCommandNotAnObjectException
()
{
$this
->
setExpectedException
(
'LQDN\Exception\CommandNotAnObjectException'
);
$this
->
container
[
'command_handler'
]
->
handle
(
"Not a command object"
);
}
public
function
testCommandNotHandledException
()
{
$this
->
setExpectedException
(
'LQDN\Exception\CommandNotHandledException'
);
$this
->
container
[
'command_handler'
]
->
handle
(
new
Object
());
}
}
?>
okhin
🚴
@okhin
mentioned in issue
#36 (closed)
·
Oct 13, 2018
mentioned in issue
#36 (closed)
mentioned in issue #36
Toggle commit list
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