| @@ 12-24 (lines=13) @@ | ||
| 9 | use Bruli\EventBusBundle\CommandBus\CommandHandlerInterface;  | 
                                |
| 10 | use Bruli\EventBusBundle\CommandBus\CommandInterface;  | 
                                |
| 11 | ||
| 12 | final class PostMiddleWareHandler implements CommandHandlerInterface  | 
                                |
| 13 | { | 
                                |
| 14 | const FILE_TEST = 'post-middleware.txt';  | 
                                |
| 15 | ||
| 16 | /**  | 
                                |
| 17 | * @param CommandInterface $command  | 
                                |
| 18 | */  | 
                                |
| 19 | public function handle(CommandInterface $command)  | 
                                |
| 20 |     { | 
                                |
| 21 | file_put_contents(__DIR__. '/' . self::FILE_TEST , 'testing');  | 
                                |
| 22 | unlink(__DIR__. '/' . WithPostMiddleWareHandler::FILE_TEST);  | 
                                |
| 23 | }  | 
                                |
| 24 | }  | 
                                |
| 25 | ||
| @@ 12-24 (lines=13) @@ | ||
| 9 | use Bruli\EventBusBundle\CommandBus\CommandHandlerInterface;  | 
                                |
| 10 | use Bruli\EventBusBundle\CommandBus\CommandInterface;  | 
                                |
| 11 | ||
| 12 | final class WithPreMiddleWareHandler implements CommandHandlerInterface  | 
                                |
| 13 | { | 
                                |
| 14 | const FILE_TEST = 'with_pre_middleware.txt';  | 
                                |
| 15 | ||
| 16 | /**  | 
                                |
| 17 | * @param CommandInterface $command  | 
                                |
| 18 | */  | 
                                |
| 19 | public function handle(CommandInterface $command)  | 
                                |
| 20 |     { | 
                                |
| 21 | file_put_contents(__DIR__. '/../Behaviour/' . self::FILE_TEST , 'testing');  | 
                                |
| 22 | unlink(__DIR__. '/../Behaviour/'. PreMiddleWareHandler::FILE_TEST);  | 
                                |
| 23 | }  | 
                                |
| 24 | }  | 
                                |
| 25 | ||