CommandHandlerTest.php 614 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
<?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');
Okhin's avatar
Okhin committed
19
        $this->container['command_handler']->handle(new class{});
Okhin's avatar
Okhin committed
20
21
22
23
    }
}

?>