Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
don
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
25
Issues
25
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
Operations
Operations
Incidents
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
LQDN Adminsys
don
Commits
ddaa1b20
Commit
ddaa1b20
authored
Oct 13, 2018
by
Okhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test for the CommandHandler
parent
213037a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
+25
-2
tests/functional/Handler/AddressHandlerTest.php
tests/functional/Handler/AddressHandlerTest.php
+2
-2
tests/functional/Handler/CommandHandlerTest.php
tests/functional/Handler/CommandHandlerTest.php
+23
-0
No files found.
tests/functional/Handler/AddressHandlerTest.php
View file @
ddaa1b20
...
...
@@ -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 @
ddaa1b20
<?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
());
}
}
?>
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