tests/Behaviour/PostMiddleWareHandler.php 1 location
|
@@ 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 |
|
|
tests/Behaviour/PostSecondMiddleWareHandler.php 1 location
|
@@ 12-24 (lines=13) @@
|
9 |
|
use Bruli\EventBusBundle\CommandBus\CommandHandlerInterface; |
10 |
|
use Bruli\EventBusBundle\CommandBus\CommandInterface; |
11 |
|
|
12 |
|
final class PostSecondMiddleWareHandler implements CommandHandlerInterface |
13 |
|
{ |
14 |
|
const FILE_TEST = 'post-second-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_SECOND_TEST); |
23 |
|
} |
24 |
|
} |
25 |
|
|
tests/Behaviour/WithPostMiddleWareHandler.php 1 location
|
@@ 12-25 (lines=14) @@
|
9 |
|
use Bruli\EventBusBundle\CommandBus\CommandHandlerInterface; |
10 |
|
use Bruli\EventBusBundle\CommandBus\CommandInterface; |
11 |
|
|
12 |
|
final class WithPostMiddleWareHandler implements CommandHandlerInterface |
13 |
|
{ |
14 |
|
const FILE_TEST = 'with-post-middleware.txt'; |
15 |
|
const FILE_SECOND_TEST = 'with-second-post-middleware.txt'; |
16 |
|
|
17 |
|
/** |
18 |
|
* @param CommandInterface $command |
19 |
|
*/ |
20 |
|
public function handle(CommandInterface $command) |
21 |
|
{ |
22 |
|
file_put_contents(__DIR__. '/' . self::FILE_TEST , 'testing'); |
23 |
|
file_put_contents(__DIR__. '/' . self::FILE_SECOND_TEST , 'testing'); |
24 |
|
} |
25 |
|
} |