CommandHandlerTest.php 615 Bytes
Newer Older
Okhin's avatar
Okhin committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
<?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());
    }
}

?>