-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #90 from prolic/master
Cleanup and tests for service bus
- Loading branch information
Showing
10 changed files
with
87 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
/* | ||
* This file is part of the prooph/service-bus. | ||
* (c) 2014-2015 prooph software GmbH <contact@prooph.de> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* Date: 11/06/15 - 3:02 PM | ||
*/ | ||
|
||
namespace ProophTest\ServiceBus; | ||
|
||
use Prooph\Common\Event\ActionEventEmitter; | ||
use ProophTest\ServiceBus\Mock\CustomMessageBus; | ||
|
||
/** | ||
* Class MessageBusTest | ||
* @package ProophTest\ServiceBus | ||
*/ | ||
final class MessageBusTest extends TestCase | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
public function it_attaches_action_event_emitter() | ||
{ | ||
$actionEventEmitter = $this->prophesize(ActionEventEmitter::class); | ||
$mock = $actionEventEmitter->reveal(); | ||
|
||
$messageBus = new CustomMessageBus(); | ||
$messageBus->setActionEventEmitter($mock); | ||
|
||
$this->assertSame($mock, $messageBus->getActionEventEmitter()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
/* | ||
* This file is part of the prooph/service-bus. | ||
* (c) 2014-2015 prooph software GmbH <contact@prooph.de> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
* | ||
* Date: 11/06/15 - 3:00 PM | ||
*/ | ||
|
||
namespace ProophTest\ServiceBus\Mock; | ||
|
||
use Prooph\ServiceBus\MessageBus; | ||
|
||
/** | ||
* Class CustomMessageBus | ||
* @package ProophTest\ServiceBus\Mock | ||
*/ | ||
final class CustomMessageBus extends MessageBus | ||
{ | ||
/** | ||
* @param mixed $message | ||
*/ | ||
public function dispatch($message) | ||
{ | ||
// do nothing | ||
} | ||
} |