diff --git a/composer.json b/composer.json index 2db59dc..d9084f2 100644 --- a/composer.json +++ b/composer.json @@ -45,7 +45,7 @@ }, "autoload-dev": { "psr-4": { - "Prooph\\ServiceBusTest\\": "tests/" + "ProophTest\\ServiceBus\\": "tests/" } } } diff --git a/tests/CommandBusTest.php b/tests/CommandBusTest.php index 07368f8..5221e93 100644 --- a/tests/CommandBusTest.php +++ b/tests/CommandBusTest.php @@ -9,7 +9,7 @@ * Date: 08/02/15 - 8:17 PM */ -namespace Prooph\ServiceBusTest; +namespace ProophTest\ServiceBus; use Prooph\Common\Event\ActionEvent; use Prooph\Common\Event\DefaultActionEvent; @@ -17,14 +17,14 @@ use Prooph\ServiceBus\Exception\MessageDispatchException; use Prooph\ServiceBus\MessageBus; use Prooph\ServiceBus\QueryBus; -use Prooph\ServiceBusTest\Mock\CustomMessage; -use Prooph\ServiceBusTest\Mock\DoSomething; -use Prooph\ServiceBusTest\Mock\ErrorProducer; -use Prooph\ServiceBusTest\Mock\MessageHandler; +use ProophTest\ServiceBus\Mock\CustomMessage; +use ProophTest\ServiceBus\Mock\DoSomething; +use ProophTest\ServiceBus\Mock\ErrorProducer; +use ProophTest\ServiceBus\Mock\MessageHandler; /** * Class CommandBusTest - * @package Prooph\ServiceBusTest + * @package ProophTest\ServiceBus */ final class CommandBusTest extends TestCase { diff --git a/tests/Container/BusFactoriesTest.php b/tests/Container/BusFactoriesTest.php index fa089e7..4ca4a0a 100644 --- a/tests/Container/BusFactoriesTest.php +++ b/tests/Container/BusFactoriesTest.php @@ -9,7 +9,7 @@ * Date: 08/16/15 - 9:34 PM */ -namespace Prooph\ServiceBusTest\Factory; +namespace ProophTest\ServiceBus\Factory; use Interop\Container\ContainerInterface; use Prooph\Common\Event\ActionEventEmitter; @@ -23,13 +23,13 @@ use Prooph\ServiceBus\Container\QueryBusFactory; use Prooph\ServiceBus\Plugin\Router\RegexRouter; use Prooph\ServiceBus\QueryBus; -use Prooph\ServiceBusTest\TestCase; +use ProophTest\ServiceBus\TestCase; use Prophecy\Argument; /** * Class BusFactoriesTest * - * @package Prooph\ServiceBusTest\Container + * @package ProophTest\ServiceBus\Container * @author Alexander Miertsch */ final class BusFactoriesTest extends TestCase diff --git a/tests/Container/Plugin/Guard/FinalizeGuardFactoryTest.php b/tests/Container/Plugin/Guard/FinalizeGuardFactoryTest.php index 29b03b0..17e2adb 100644 --- a/tests/Container/Plugin/Guard/FinalizeGuardFactoryTest.php +++ b/tests/Container/Plugin/Guard/FinalizeGuardFactoryTest.php @@ -9,7 +9,7 @@ * Date: 09/13/15 -7:47 PM */ -namespace Prooph\ServiceBusTest\Container\Plugin\Guard; +namespace ProophTest\ServiceBus\Container\Plugin\Guard; use Interop\Container\ContainerInterface; use PHPUnit_Framework_TestCase as TestCase; @@ -19,7 +19,7 @@ /** * Class FinalizeGuardFactoryTest - * @package Prooph\ServiceBusTest\Container\Plugin\Guard + * @package ProophTest\ServiceBus\Container\Plugin\Guard */ final class FinalizeGuardFactoryTest extends TestCase { diff --git a/tests/Container/Plugin/Guard/RouteGuardFactoryTest.php b/tests/Container/Plugin/Guard/RouteGuardFactoryTest.php index 6e94926..5c98588 100644 --- a/tests/Container/Plugin/Guard/RouteGuardFactoryTest.php +++ b/tests/Container/Plugin/Guard/RouteGuardFactoryTest.php @@ -9,7 +9,7 @@ * Date: 09/13/15 -7:47 PM */ -namespace Prooph\ServiceBusTest\Container\Plugin\Guard; +namespace ProophTest\ServiceBus\Container\Plugin\Guard; use Interop\Container\ContainerInterface; use PHPUnit_Framework_TestCase as TestCase; @@ -19,7 +19,7 @@ /** * Class RouteGuardFactoryTest - * @package Prooph\ServiceBusTest\Container\Plugin\Guard + * @package ProophTest\ServiceBus\Container\Plugin\Guard */ final class RouteGuardFactoryTest extends TestCase { diff --git a/tests/EventBusTest.php b/tests/EventBusTest.php index 905e485..d9cdecf 100644 --- a/tests/EventBusTest.php +++ b/tests/EventBusTest.php @@ -9,21 +9,21 @@ * Date: 08/02/15 - 8:17 PM */ -namespace Prooph\ServiceBusTest; +namespace ProophTest\ServiceBus; use Prooph\Common\Event\ActionEvent; use Prooph\Common\Event\DefaultActionEvent; use Prooph\ServiceBus\EventBus; use Prooph\ServiceBus\Exception\MessageDispatchException; use Prooph\ServiceBus\MessageBus; -use Prooph\ServiceBusTest\Mock\CustomMessage; -use Prooph\ServiceBusTest\Mock\ErrorProducer; -use Prooph\ServiceBusTest\Mock\MessageHandler; -use Prooph\ServiceBusTest\Mock\SomethingDone; +use ProophTest\ServiceBus\Mock\CustomMessage; +use ProophTest\ServiceBus\Mock\ErrorProducer; +use ProophTest\ServiceBus\Mock\MessageHandler; +use ProophTest\ServiceBus\Mock\SomethingDone; /** * Class EventBusTest - * @package Prooph\ServiceBusTest + * @package ProophTest\ServiceBus */ final class EventBusTest extends TestCase { diff --git a/tests/Mock/CustomMessage.php b/tests/Mock/CustomMessage.php index 943be09..c1d452f 100644 --- a/tests/Mock/CustomMessage.php +++ b/tests/Mock/CustomMessage.php @@ -9,11 +9,11 @@ * Date: 08/02/15 - 8:35 PM */ -namespace Prooph\ServiceBusTest\Mock; +namespace ProophTest\ServiceBus\Mock; /** * Class CustomMessage - * @package Prooph\ServiceBusTest\Mock + * @package ProophTest\ServiceBus\Mock */ final class CustomMessage { diff --git a/tests/Mock/CustomMessageCommandHandler.php b/tests/Mock/CustomMessageCommandHandler.php index bb8573b..45cf6b4 100644 --- a/tests/Mock/CustomMessageCommandHandler.php +++ b/tests/Mock/CustomMessageCommandHandler.php @@ -9,11 +9,11 @@ * Date: 08/02/15 - 8:38 PM */ -namespace Prooph\ServiceBusTest\Mock; +namespace ProophTest\ServiceBus\Mock; /** * Class CustomMessageCommandHandler - * @package Prooph\ServiceBusTest\Mock + * @package ProophTest\ServiceBus\Mock */ final class CustomMessageCommandHandler { diff --git a/tests/Mock/DoSomething.php b/tests/Mock/DoSomething.php index fd68b17..74de0de 100644 --- a/tests/Mock/DoSomething.php +++ b/tests/Mock/DoSomething.php @@ -9,7 +9,7 @@ * Date: 08/02/15 - 8:19 PM */ -namespace Prooph\ServiceBusTest\Mock; +namespace ProophTest\ServiceBus\Mock; use Prooph\Common\Messaging\Command; use Prooph\Common\Messaging\PayloadConstructable; @@ -17,7 +17,7 @@ /** * Class DoSomething - * @package Prooph\ServiceBusTest\Mock + * @package ProophTest\ServiceBus\Mock */ final class DoSomething extends Command implements PayloadConstructable { diff --git a/tests/Mock/ErrorProducer.php b/tests/Mock/ErrorProducer.php index 1306cea..90a07d2 100644 --- a/tests/Mock/ErrorProducer.php +++ b/tests/Mock/ErrorProducer.php @@ -9,11 +9,11 @@ * Date: 08/02/15 - 8:40 PM */ -namespace Prooph\ServiceBusTest\Mock; +namespace ProophTest\ServiceBus\Mock; /** * Class ErrorProducer - * @package Prooph\ServiceBusTest\Mock + * @package ProophTest\ServiceBus\Mock */ final class ErrorProducer { diff --git a/tests/Mock/FetchSomething.php b/tests/Mock/FetchSomething.php index a264a65..d92ebbf 100644 --- a/tests/Mock/FetchSomething.php +++ b/tests/Mock/FetchSomething.php @@ -9,7 +9,7 @@ * Date: 08/02/15 - 9:55 PM */ -namespace Prooph\ServiceBusTest\Mock; +namespace ProophTest\ServiceBus\Mock; use Prooph\Common\Messaging\PayloadConstructable; use Prooph\Common\Messaging\PayloadTrait; @@ -17,7 +17,7 @@ /** * Class FetchSomething - * @package Prooph\ServiceBusTest\Mock + * @package ProophTest\ServiceBus\Mock */ final class FetchSomething extends Query implements PayloadConstructable { diff --git a/tests/Mock/Finder.php b/tests/Mock/Finder.php index 70db8b7..b886e6f 100644 --- a/tests/Mock/Finder.php +++ b/tests/Mock/Finder.php @@ -9,11 +9,11 @@ * Date: 08/02/15 - 9:31 PM */ -namespace Prooph\ServiceBusTest\Mock; +namespace ProophTest\ServiceBus\Mock; /** * Class Finder - * @package Prooph\ServiceBusTest\Mock + * @package ProophTest\ServiceBus\Mock */ final class Finder { diff --git a/tests/Mock/MessageHandler.php b/tests/Mock/MessageHandler.php index 6f1e7b3..abf09f0 100644 --- a/tests/Mock/MessageHandler.php +++ b/tests/Mock/MessageHandler.php @@ -9,11 +9,11 @@ * Date: 08/02/15 - 8:38 PM */ -namespace Prooph\ServiceBusTest\Mock; +namespace ProophTest\ServiceBus\Mock; /** * Class MessageHandler - * @package Prooph\ServiceBusTest\Mock + * @package ProophTest\ServiceBus\Mock */ final class MessageHandler { diff --git a/tests/Mock/SomethingDone.php b/tests/Mock/SomethingDone.php index 3f76373..b5b2338 100644 --- a/tests/Mock/SomethingDone.php +++ b/tests/Mock/SomethingDone.php @@ -9,7 +9,7 @@ * Date: 08/02/15 - 9:46 PM */ -namespace Prooph\ServiceBusTest\Mock; +namespace ProophTest\ServiceBus\Mock; use Prooph\Common\Messaging\DomainEvent; use Prooph\Common\Messaging\PayloadConstructable; @@ -17,7 +17,7 @@ /** * Class SomethingDone - * @package Prooph\ServiceBusTest\Mock + * @package ProophTest\ServiceBus\Mock */ final class SomethingDone extends DomainEvent implements PayloadConstructable { diff --git a/tests/Plugin/Guard/FinalizeGuardTest.php b/tests/Plugin/Guard/FinalizeGuardTest.php index 6113c81..c4b433c 100644 --- a/tests/Plugin/Guard/FinalizeGuardTest.php +++ b/tests/Plugin/Guard/FinalizeGuardTest.php @@ -1,6 +1,6 @@ */ final class FinderInvokeStrategyTest extends \PHPUnit_Framework_TestCase diff --git a/tests/Plugin/InvokeStrategy/HandleCommandStrategyTest.php b/tests/Plugin/InvokeStrategy/HandleCommandStrategyTest.php index 93c1215..9669a1d 100644 --- a/tests/Plugin/InvokeStrategy/HandleCommandStrategyTest.php +++ b/tests/Plugin/InvokeStrategy/HandleCommandStrategyTest.php @@ -9,18 +9,18 @@ * Date: 03/09/14 - 21:45 */ -namespace Prooph\ServiceBusTest\Plugin\InvokeStrategy; +namespace ProophTest\ServiceBus\Plugin\InvokeStrategy; use Prooph\ServiceBus\Plugin\InvokeStrategy\HandleCommandStrategy; -use Prooph\ServiceBusTest\Mock\CustomMessage; -use Prooph\ServiceBusTest\Mock\CustomMessageCommandHandler; -use Prooph\ServiceBusTest\Mock\MessageHandler; -use Prooph\ServiceBusTest\TestCase; +use ProophTest\ServiceBus\Mock\CustomMessage; +use ProophTest\ServiceBus\Mock\CustomMessageCommandHandler; +use ProophTest\ServiceBus\Mock\MessageHandler; +use ProophTest\ServiceBus\TestCase; /** * Class HandleCommandStrategyTest * - * @package Prooph\ServiceBusTest\InvokeStrategy + * @package ProophTest\ServiceBus\Plugin\InvokeStrategy * @author Alexander Miertsch */ class HandleCommandStrategyTest extends TestCase diff --git a/tests/Plugin/InvokeStrategy/OnEventStrategyTest.php b/tests/Plugin/InvokeStrategy/OnEventStrategyTest.php index 60523c9..231512a 100644 --- a/tests/Plugin/InvokeStrategy/OnEventStrategyTest.php +++ b/tests/Plugin/InvokeStrategy/OnEventStrategyTest.php @@ -9,17 +9,17 @@ * Date: 03/11/14 - 21:51 */ -namespace Prooph\ServiceBusTest\Plugin\InvokeStrategy; +namespace ProophTest\ServiceBus\Plugin\InvokeStrategy; use Prooph\ServiceBus\Plugin\InvokeStrategy\OnEventStrategy; -use Prooph\ServiceBusTest\Mock\CustomMessage; -use Prooph\ServiceBusTest\Mock\MessageHandler; -use Prooph\ServiceBusTest\TestCase; +use ProophTest\ServiceBus\Mock\CustomMessage; +use ProophTest\ServiceBus\Mock\MessageHandler; +use ProophTest\ServiceBus\TestCase; /** * Class OnEventStrategyTest * - * @package Prooph\ServiceBusTest\InvokeStrategy + * @package ProophTest\ServiceBus\Plugin\InvokeStrategy * @author Alexander Miertsch */ class OnEventStrategyTest extends TestCase diff --git a/tests/Plugin/MessageFactoryPluginTest.php b/tests/Plugin/MessageFactoryPluginTest.php index fc34c21..4e3f314 100644 --- a/tests/Plugin/MessageFactoryPluginTest.php +++ b/tests/Plugin/MessageFactoryPluginTest.php @@ -9,7 +9,7 @@ * Date: 08/02/15 - 10:31 PM */ -namespace Prooph\ServiceBusTest\Plugin; +namespace ProophTest\ServiceBus\Plugin; use PHPUnit_Framework_TestCase as TestCase; use Prooph\Common\Event\ActionEvent; @@ -18,12 +18,12 @@ use Prooph\ServiceBus\CommandBus; use Prooph\ServiceBus\MessageBus; use Prooph\ServiceBus\Plugin\MessageFactoryPlugin; -use Prooph\ServiceBusTest\Mock\DoSomething; +use ProophTest\ServiceBus\Mock\DoSomething; use Prophecy\Argument; /** * Class MessageFactoryPluginTest - * @package Prooph\ServiceBusTest + * @package ProophTest\ServiceBus\Plugin */ final class MessageFactoryPluginTest extends TestCase { diff --git a/tests/Plugin/MessageProducerPluginTest.php b/tests/Plugin/MessageProducerPluginTest.php index 37161d3..fe46c2a 100644 --- a/tests/Plugin/MessageProducerPluginTest.php +++ b/tests/Plugin/MessageProducerPluginTest.php @@ -8,7 +8,7 @@ * * Date: 10/3/15 - 9:17 PM */ -namespace Prooph\ServiceBusTest\Plugin; +namespace ProophTest\ServiceBus\Plugin; use Prooph\Common\Event\ActionEvent; use Prooph\Common\Event\ActionEventEmitter; @@ -18,12 +18,12 @@ use Prooph\ServiceBus\EventBus; use Prooph\ServiceBus\MessageBus; use Prooph\ServiceBus\Plugin\MessageProducerPlugin; -use Prooph\ServiceBusTest\TestCase; +use ProophTest\ServiceBus\TestCase; /** * Class MessageProducerPluginTest * - * @package Prooph\ServiceBusTest\Plugin + * @package ProophTest\ServiceBus\Plugin */ final class MessageProducerPluginTest extends TestCase { diff --git a/tests/Plugin/Router/EventRouterTest.php b/tests/Plugin/Router/EventRouterTest.php index c676b0e..5e7ea0e 100644 --- a/tests/Plugin/Router/EventRouterTest.php +++ b/tests/Plugin/Router/EventRouterTest.php @@ -9,18 +9,18 @@ * Date: 09/23/14 - 20:37 */ -namespace Prooph\ServiceBusTest\Plugin\Router; +namespace ProophTest\ServiceBus\Plugin\Router; use Prooph\Common\Event\DefaultActionEvent; use Prooph\ServiceBus\EventBus; use Prooph\ServiceBus\MessageBus; use Prooph\ServiceBus\Plugin\Router\EventRouter; -use Prooph\ServiceBusTest\TestCase; +use ProophTest\ServiceBus\TestCase; /** * Class EventRouterTest * - * @package Prooph\ServiceBusTest\Router + * @package ProophTest\ServiceBus\Plugin\Router * @author Alexander Miertsch */ class EventRouterTest extends TestCase diff --git a/tests/Plugin/Router/RegexRouterTest.php b/tests/Plugin/Router/RegexRouterTest.php index 2aea783..9d3f508 100644 --- a/tests/Plugin/Router/RegexRouterTest.php +++ b/tests/Plugin/Router/RegexRouterTest.php @@ -9,19 +9,19 @@ * Date: 10/30/14 - 22:47 */ -namespace Prooph\ServiceBusTest\Plugin\Router; +namespace ProophTest\ServiceBus\Plugin\Router; use Prooph\Common\Event\DefaultActionEvent; use Prooph\ServiceBus\CommandBus; use Prooph\ServiceBus\EventBus; use Prooph\ServiceBus\MessageBus; use Prooph\ServiceBus\Plugin\Router\RegexRouter; -use Prooph\ServiceBusTest\TestCase; +use ProophTest\ServiceBus\TestCase; /** * Class RegexRouterTest * - * @package Prooph\ServiceBusTest\Router + * @package ProophTest\ServiceBus\Plugin\Router * @author Alexander Miertsch */ class RegexRouterTest extends TestCase @@ -33,10 +33,10 @@ public function it_matches_pattern_with_command_name_to_detect_appropriate_handl { $regexRouter = new RegexRouter(); - $regexRouter->route('/^'.preg_quote('Prooph\ServiceBusTest\Mock\Do').'.*/')->to("DoSomethingHandler"); + $regexRouter->route('/^'.preg_quote('ProophTest\ServiceBus\Mock\Do').'.*/')->to("DoSomethingHandler"); $actionEvent = new DefaultActionEvent(MessageBus::EVENT_ROUTE, new CommandBus(), [ - MessageBus::EVENT_PARAM_MESSAGE_NAME => 'Prooph\ServiceBusTest\Mock\DoSomething', + MessageBus::EVENT_PARAM_MESSAGE_NAME => 'ProophTest\ServiceBus\Mock\DoSomething', ]); $regexRouter->onRoute($actionEvent); @@ -51,10 +51,10 @@ public function it_returns_early_when_message_name_is_empty() { $regexRouter = new RegexRouter(); - $regexRouter->route('/^'.preg_quote('Prooph\ServiceBusTest\Mock\Do').'.*/')->to("DoSomethingHandler"); + $regexRouter->route('/^'.preg_quote('ProophTest\ServiceBus\Mock\Do').'.*/')->to("DoSomethingHandler"); $actionEvent = new DefaultActionEvent(MessageBus::EVENT_ROUTE, new CommandBus(), [ - '' => 'Prooph\ServiceBusTest\Mock\DoSomething', + '' => 'ProophTest\ServiceBus\Mock\DoSomething', ]); $regexRouter->onRoute($actionEvent); @@ -69,13 +69,13 @@ public function it_does_not_allow_that_two_pattern_matches_with_same_command_nam { $regexRouter = new RegexRouter(); - $regexRouter->route('/^'.preg_quote('Prooph\ServiceBusTest\Mock\Do').'.*/')->to("DoSomethingHandler"); - $regexRouter->route('/^'.preg_quote('Prooph\ServiceBusTest\Mock\\').'.*/')->to("DoSomethingHandler2"); + $regexRouter->route('/^'.preg_quote('ProophTest\ServiceBus\Mock\Do').'.*/')->to("DoSomethingHandler"); + $regexRouter->route('/^'.preg_quote('ProophTest\ServiceBus\Mock\\').'.*/')->to("DoSomethingHandler2"); $this->setExpectedException('\Prooph\ServiceBus\Exception\RuntimeException'); $actionEvent = new DefaultActionEvent(MessageBus::EVENT_ROUTE, new CommandBus(), [ - MessageBus::EVENT_PARAM_MESSAGE_NAME => 'Prooph\ServiceBusTest\Mock\DoSomething', + MessageBus::EVENT_PARAM_MESSAGE_NAME => 'ProophTest\ServiceBus\Mock\DoSomething', ]); $regexRouter->onRoute($actionEvent); @@ -88,11 +88,11 @@ public function it_matches_pattern_with_event_name_and_routes_to_multiple_listen { $regexRouter = new RegexRouter(); - $regexRouter->route('/^'.preg_quote('Prooph\ServiceBusTest\Mock\\').'.*Done$/')->to("SomethingDoneListener1"); - $regexRouter->route('/^'.preg_quote('Prooph\ServiceBusTest\Mock\\').'.*Done$/')->to("SomethingDoneListener2"); + $regexRouter->route('/^'.preg_quote('ProophTest\ServiceBus\Mock\\').'.*Done$/')->to("SomethingDoneListener1"); + $regexRouter->route('/^'.preg_quote('ProophTest\ServiceBus\Mock\\').'.*Done$/')->to("SomethingDoneListener2"); $actionEvent = new DefaultActionEvent(MessageBus::EVENT_ROUTE, new EventBus(), [ - MessageBus::EVENT_PARAM_MESSAGE_NAME => 'Prooph\ServiceBusTest\Mock\SomethingDone', + MessageBus::EVENT_PARAM_MESSAGE_NAME => 'ProophTest\ServiceBus\Mock\SomethingDone', ]); $regexRouter->onRoute($actionEvent); @@ -107,11 +107,11 @@ public function it_returns_early_when_message_name_is_empty_on_multiple_listener { $regexRouter = new RegexRouter(); - $regexRouter->route('/^'.preg_quote('Prooph\ServiceBusTest\Mock\\').'.*Done$/')->to("SomethingDoneListener1"); - $regexRouter->route('/^'.preg_quote('Prooph\ServiceBusTest\Mock\\').'.*Done$/')->to("SomethingDoneListener2"); + $regexRouter->route('/^'.preg_quote('ProophTest\ServiceBus\Mock\\').'.*Done$/')->to("SomethingDoneListener1"); + $regexRouter->route('/^'.preg_quote('ProophTest\ServiceBus\Mock\\').'.*Done$/')->to("SomethingDoneListener2"); $actionEvent = new DefaultActionEvent(MessageBus::EVENT_ROUTE, new EventBus(), [ - '' => 'Prooph\ServiceBusTest\Mock\SomethingDone', + '' => 'ProophTest\ServiceBus\Mock\SomethingDone', ]); $regexRouter->onRoute($actionEvent); @@ -127,7 +127,7 @@ public function it_fails_on_routing_a_second_pattern_before_first_definition_is_ { $router = new RegexRouter(); - $router->route('Prooph\ServiceBusTest\Mock\DoSomething'); + $router->route('ProophTest\ServiceBus\Mock\DoSomething'); $router->route('/.*/'); } @@ -160,13 +160,13 @@ public function it_fails_when_routing_to_invalid_handler() public function it_takes_a_routing_definition_on_instantiation() { $router = new RegexRouter([ - '/^'.preg_quote('Prooph\ServiceBusTest\Mock\Do').'.*/' => 'DoSomethingHandler', - '/^'.preg_quote('Prooph\ServiceBusTest\Mock\\').'.*Done$/' => ["SomethingDoneListener1", "SomethingDoneListener2"] + '/^'.preg_quote('ProophTest\ServiceBus\Mock\Do').'.*/' => 'DoSomethingHandler', + '/^'.preg_quote('ProophTest\ServiceBus\Mock\\').'.*Done$/' => ["SomethingDoneListener1", "SomethingDoneListener2"] ]); $actionEvent = new DefaultActionEvent(MessageBus::EVENT_ROUTE, new CommandBus(), [ - MessageBus::EVENT_PARAM_MESSAGE_NAME => 'Prooph\ServiceBusTest\Mock\DoSomething', + MessageBus::EVENT_PARAM_MESSAGE_NAME => 'ProophTest\ServiceBus\Mock\DoSomething', ]); $router->onRoute($actionEvent); @@ -174,7 +174,7 @@ public function it_takes_a_routing_definition_on_instantiation() $this->assertEquals("DoSomethingHandler", $actionEvent->getParam(MessageBus::EVENT_PARAM_MESSAGE_HANDLER)); $actionEvent = new DefaultActionEvent(MessageBus::EVENT_ROUTE, new EventBus(), [ - MessageBus::EVENT_PARAM_MESSAGE_NAME => 'Prooph\ServiceBusTest\Mock\SomethingDone', + MessageBus::EVENT_PARAM_MESSAGE_NAME => 'ProophTest\ServiceBus\Mock\SomethingDone', ]); $router->onRoute($actionEvent); diff --git a/tests/Plugin/Router/SingleHandlerRouterTest.php b/tests/Plugin/Router/SingleHandlerRouterTest.php index ab9e00e..c97347d 100644 --- a/tests/Plugin/Router/SingleHandlerRouterTest.php +++ b/tests/Plugin/Router/SingleHandlerRouterTest.php @@ -9,18 +9,18 @@ * Date: 09/14/14 - 23:51 */ -namespace Prooph\ServiceBusTest\Plugin\Router; +namespace ProophTest\ServiceBus\Plugin\Router; use Prooph\Common\Event\DefaultActionEvent; use Prooph\ServiceBus\CommandBus; use Prooph\ServiceBus\MessageBus; use Prooph\ServiceBus\Plugin\Router\CommandRouter; -use Prooph\ServiceBusTest\TestCase; +use ProophTest\ServiceBus\TestCase; /** * Class SingleHandlerRouterTest * - * @package Prooph\ServiceBusTest\Router + * @package ProophTest\ServiceBus\Plugin\Router * @author Alexander Miertsch */ class SingleHandlerRouterTest extends TestCase @@ -32,10 +32,10 @@ public function it_can_handle_routing_definition_by_chaining_route_to() { $router = new CommandRouter(); - $router->route('Prooph\ServiceBusTest\Mock\DoSomething')->to("DoSomethingHandler"); + $router->route('ProophTest\ServiceBus\Mock\DoSomething')->to("DoSomethingHandler"); $actionEvent = new DefaultActionEvent(MessageBus::EVENT_ROUTE, new CommandBus(), [ - MessageBus::EVENT_PARAM_MESSAGE_NAME => 'Prooph\ServiceBusTest\Mock\DoSomething', + MessageBus::EVENT_PARAM_MESSAGE_NAME => 'ProophTest\ServiceBus\Mock\DoSomething', ]); $router->onRouteMessage($actionEvent); @@ -51,7 +51,7 @@ public function it_fails_when_routing_to_invalid_handler() { $router = new CommandRouter(); - $router->route('Prooph\ServiceBusTest\Mock\DoSomething')->to(null); + $router->route('ProophTest\ServiceBus\Mock\DoSomething')->to(null); } /** @@ -61,7 +61,7 @@ public function it_returns_early_when_message_name_is_empty() { $router = new CommandRouter(); - $router->route('Prooph\ServiceBusTest\Mock\DoSomething')->to("DoSomethingHandler"); + $router->route('ProophTest\ServiceBus\Mock\DoSomething')->to("DoSomethingHandler"); $actionEvent = new DefaultActionEvent(MessageBus::EVENT_ROUTE, new CommandBus(), [ MessageBus::EVENT_PARAM_MESSAGE_NAME => 'unknown', @@ -79,10 +79,10 @@ public function it_returns_early_when_message_name_is_not_in_event_map() { $router = new CommandRouter(); - $router->route('Prooph\ServiceBusTest\Mock\DoSomething')->to("DoSomethingHandler"); + $router->route('ProophTest\ServiceBus\Mock\DoSomething')->to("DoSomethingHandler"); $actionEvent = new DefaultActionEvent(MessageBus::EVENT_ROUTE, new CommandBus(), [ - '' => 'Prooph\ServiceBusTest\Mock\DoSomething', + '' => 'ProophTest\ServiceBus\Mock\DoSomething', ]); $router->onRouteMessage($actionEvent); @@ -97,7 +97,7 @@ public function it_fails_on_routing_a_second_command_before_first_definition_is_ { $router = new CommandRouter(); - $router->route('Prooph\ServiceBusTest\Mock\DoSomething'); + $router->route('ProophTest\ServiceBus\Mock\DoSomething'); $this->setExpectedException('\Prooph\ServiceBus\Exception\RuntimeException'); @@ -122,11 +122,11 @@ public function it_fails_on_setting_a_handler_before_a_command_is_set() public function it_takes_a_routing_definition_on_instantiation() { $router = new CommandRouter([ - 'Prooph\ServiceBusTest\Mock\DoSomething' => 'DoSomethingHandler' + 'ProophTest\ServiceBus\Mock\DoSomething' => 'DoSomethingHandler' ]); $actionEvent = new DefaultActionEvent(MessageBus::EVENT_ROUTE, new CommandBus(), [ - MessageBus::EVENT_PARAM_MESSAGE_NAME => 'Prooph\ServiceBusTest\Mock\DoSomething', + MessageBus::EVENT_PARAM_MESSAGE_NAME => 'ProophTest\ServiceBus\Mock\DoSomething', ]); $router->onRouteMessage($actionEvent); diff --git a/tests/Plugin/ServiceLocatorPluginTest.php b/tests/Plugin/ServiceLocatorPluginTest.php index da537e7..e8126bc 100644 --- a/tests/Plugin/ServiceLocatorPluginTest.php +++ b/tests/Plugin/ServiceLocatorPluginTest.php @@ -8,19 +8,19 @@ * * Date: 08/02/15 - 10:27 PM */ -namespace Prooph\ServiceBusTest\Plugin; +namespace ProophTest\ServiceBus\Plugin; use Interop\Container\ContainerInterface; use Prooph\Common\Event\DefaultActionEvent; use Prooph\ServiceBus\CommandBus; use Prooph\ServiceBus\MessageBus; use Prooph\ServiceBus\Plugin\ServiceLocatorPlugin; -use Prooph\ServiceBusTest\Mock\MessageHandler; -use Prooph\ServiceBusTest\TestCase; +use ProophTest\ServiceBus\Mock\MessageHandler; +use ProophTest\ServiceBus\TestCase; /** * Class ServiceLocatorPluginTest - * @package Prooph\ServiceBusTest\Plugin + * @package ProophTest\ServiceBus\Plugin */ final class ServiceLocatorPluginTest extends TestCase { diff --git a/tests/QueryBusTest.php b/tests/QueryBusTest.php index ed42166..603588f 100644 --- a/tests/QueryBusTest.php +++ b/tests/QueryBusTest.php @@ -9,7 +9,7 @@ * Date: 08/02/15 - 8:17 PM */ -namespace Prooph\ServiceBusTest; +namespace ProophTest\ServiceBus; use Prooph\Common\Event\ActionEvent; use Prooph\Common\Event\DefaultActionEvent; @@ -18,16 +18,16 @@ use Prooph\ServiceBus\MessageBus; use Prooph\ServiceBus\Plugin\InvokeStrategy\FinderInvokeStrategy; use Prooph\ServiceBus\QueryBus; -use Prooph\ServiceBusTest\Mock\CustomMessage; -use Prooph\ServiceBusTest\Mock\ErrorProducer; -use Prooph\ServiceBusTest\Mock\FetchSomething; -use Prooph\ServiceBusTest\Mock\Finder; +use ProophTest\ServiceBus\Mock\CustomMessage; +use ProophTest\ServiceBus\Mock\ErrorProducer; +use ProophTest\ServiceBus\Mock\FetchSomething; +use ProophTest\ServiceBus\Mock\Finder; use React\Promise\Deferred; use React\Promise\Promise; /** * Class QueryBusTest - * @package Prooph\ServiceBusTest + * @package ProophTest\ServiceBus */ final class QueryBusTest extends TestCase { diff --git a/tests/TestCase.php b/tests/TestCase.php index 06fe303..0fb9080 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -9,12 +9,12 @@ * Date: 08/03/14 - 15:48 */ -namespace Prooph\ServiceBusTest; +namespace ProophTest\ServiceBus; /** * Class TestCase * - * @package Prooph\ServiceBusTest + * @package ProophTest\ServiceBus * @author Alexander Miertsch */ class TestCase extends \PHPUnit_Framework_TestCase