Commit 5572b798 authored by okhin's avatar okhin 🚴

Test for the CommandHandler

parent f67edd27
Pipeline #2018 failed with stages
in 37 seconds
......@@ -10,7 +10,7 @@ use LQDN\Tests\Functional\FunctionalTest;
class AddressHandlerTest extends FunctionalTest
{
public function notestAddressUsedDelete()
public function testAddressUsedDelete()
{
$this->assertTrue($this->addressExists(1));
......@@ -27,7 +27,7 @@ class AddressHandlerTest extends FunctionalTest
$this->assertFalse($this->addressExists(2));
}
public function notestAddressUpdate()
public function testAddressUpdate()
{
$this->assertTrue($this->addressExists(1));
$this->assertTrue($this->isDefaultAddress(1));
......
<?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());
}
}
?>
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