From 6bb1db284c1b47d1c6c9b2287147bcfc0bbd1153 Mon Sep 17 00:00:00 2001 From: prolic Date: Sat, 17 Oct 2015 12:07:06 +0100 Subject: [PATCH] fix namespace organisation in tests --- composer.json | 3 +-- tests/AggregateChangedTest.php | 4 ++-- tests/AggregateRootTest.php | 10 +++++----- .../AggregateRootDecoratorTest.php | 6 +++--- .../EventStoreIntegration/AggregateTranslatorTest.php | 10 +++++----- tests/Mock/BrokenUser.php | 4 ++-- tests/Mock/ExtendedAggregateRootDecorator.php | 4 ++-- tests/Mock/User.php | 4 ++-- tests/Mock/UserCreated.php | 4 ++-- tests/Mock/UserNameChanged.php | 4 ++-- tests/TestCase.php | 4 ++-- 11 files changed, 28 insertions(+), 29 deletions(-) diff --git a/composer.json b/composer.json index 7e35986..3666987 100644 --- a/composer.json +++ b/composer.json @@ -35,7 +35,6 @@ "autoload": { "psr-4": { "Prooph\\EventSourcing\\": "src/" - } }, "suggest" : { @@ -43,7 +42,7 @@ }, "autoload-dev": { "psr-4": { - "Prooph\\EventSourcingTest\\": "tests/" + "ProophTest\\EventSourcing\\": "tests/" } } } diff --git a/tests/AggregateChangedTest.php b/tests/AggregateChangedTest.php index bdde8c5..cf8b81f 100644 --- a/tests/AggregateChangedTest.php +++ b/tests/AggregateChangedTest.php @@ -9,14 +9,14 @@ * Date: 04/17/14 - 21:45 */ -namespace Prooph\EventSourcingTest; +namespace ProophTest\EventSourcing; use Prooph\EventSourcing\AggregateChanged; /** * Class AggregateChangedTest * - * @package Prooph\EventSourcingTest\EventSourcing + * @package ProophTest\EventSourcing\EventSourcing * @author Alexander Miertsch */ class AggregateChangedTest extends TestCase diff --git a/tests/AggregateRootTest.php b/tests/AggregateRootTest.php index 0906011..28a85bb 100644 --- a/tests/AggregateRootTest.php +++ b/tests/AggregateRootTest.php @@ -9,16 +9,16 @@ * Date: 04/18/14 - 00:03 */ -namespace Prooph\EventSourcingTest; +namespace ProophTest\EventSourcing; use Prooph\EventSourcing\EventStoreIntegration\AggregateRootDecorator; -use Prooph\EventSourcingTest\Mock\BrokenUser; -use Prooph\EventSourcingTest\Mock\User; +use ProophTest\EventSourcing\Mock\BrokenUser; +use ProophTest\EventSourcing\Mock\User; /** * Class AggregateRootTest * - * @package Prooph\EventSourcingTest\EventSourcing + * @package ProophTest\EventSourcing\EventSourcing * @author Alexander Miertsch */ class AggregateRootTest extends TestCase @@ -68,7 +68,7 @@ public function it_applies_event_by_calling_appropriate_event_handler() /** * @test * @expectedException RuntimeException - * @expectedExceptionMessage Missing event handler method whenUserCreated for aggregate root Prooph\EventSourcingTest\Mock\BrokenUser + * @expectedExceptionMessage Missing event handler method whenUserCreated for aggregate root ProophTest\EventSourcing\Mock\BrokenUser */ public function it_throws_exception_when_no_handler_on_aggregate() { diff --git a/tests/EventStoreIntegration/AggregateRootDecoratorTest.php b/tests/EventStoreIntegration/AggregateRootDecoratorTest.php index 6b8320d..468bb38 100644 --- a/tests/EventStoreIntegration/AggregateRootDecoratorTest.php +++ b/tests/EventStoreIntegration/AggregateRootDecoratorTest.php @@ -9,16 +9,16 @@ * Date: 08/26/15 - 20:32 */ -namespace Prooph\EventSourcingTest\EventStoreIntegration; +namespace ProophTest\EventSourcing\EventStoreIntegration; use PHPUnit_Framework_TestCase as TestCase; use Prooph\EventSourcing\EventStoreIntegration\AggregateRootDecorator; -use Prooph\EventSourcingTest\Mock\ExtendedAggregateRootDecorator; +use ProophTest\EventSourcing\Mock\ExtendedAggregateRootDecorator; /** * Class AggregateRootDecoratorTest * - * @package Prooph\EventSourcingTest\EventStoreIntegration + * @package ProophTest\EventSourcing\EventStoreIntegration */ class AggregateRootDecoratorTest extends TestCase { diff --git a/tests/EventStoreIntegration/AggregateTranslatorTest.php b/tests/EventStoreIntegration/AggregateTranslatorTest.php index bf7b7a6..e6e5aec 100644 --- a/tests/EventStoreIntegration/AggregateTranslatorTest.php +++ b/tests/EventStoreIntegration/AggregateTranslatorTest.php @@ -9,13 +9,13 @@ * Date: 09/07/14 - 19:49 */ -namespace Prooph\EventSourcingTest\EventStoreIntegration; +namespace ProophTest\EventSourcing\EventStoreIntegration; use Prooph\Common\Event\ProophActionEventEmitter; use Prooph\EventSourcing\EventStoreIntegration\AggregateRootDecorator; use Prooph\EventSourcing\EventStoreIntegration\AggregateTranslator; -use Prooph\EventSourcingTest\Mock\User; -use Prooph\EventSourcingTest\TestCase; +use ProophTest\EventSourcing\Mock\User; +use ProophTest\EventSourcing\TestCase; use Prooph\EventStore\Adapter\InMemoryAdapter; use Prooph\EventStore\Aggregate\AggregateRepository; use Prooph\EventStore\Aggregate\AggregateType; @@ -27,7 +27,7 @@ /** * Class AggregateTranslatorTest * - * @package Prooph\EventSourcingTest\EventStoreIntegration + * @package ProophTest\EventSourcing\EventStoreIntegration * @author Alexander Miertsch */ class AggregateTranslatorTest extends TestCase @@ -101,7 +101,7 @@ protected function resetRepository() { $this->repository = new AggregateRepository( $this->eventStore, - AggregateType::fromAggregateRootClass('Prooph\EventSourcingTest\Mock\User'), + AggregateType::fromAggregateRootClass('ProophTest\EventSourcing\Mock\User'), new AggregateTranslator(), new SingleStreamStrategy($this->eventStore) ); diff --git a/tests/Mock/BrokenUser.php b/tests/Mock/BrokenUser.php index 92b3374..1771723 100644 --- a/tests/Mock/BrokenUser.php +++ b/tests/Mock/BrokenUser.php @@ -9,7 +9,7 @@ * Date: 08/26/15 - 19:58 */ -namespace Prooph\EventSourcingTest\Mock; +namespace ProophTest\EventSourcing\Mock; use Prooph\EventSourcing\AggregateChanged; use Prooph\EventSourcing\AggregateRoot; @@ -18,7 +18,7 @@ /** * Class BrokenUser * - * @package Prooph\EventStoreTest\Mock + * @package ProophTest\EventSourcing\Mock * @author Alexander Miertsch */ class BrokenUser extends AggregateRoot diff --git a/tests/Mock/ExtendedAggregateRootDecorator.php b/tests/Mock/ExtendedAggregateRootDecorator.php index 5e6d190..5bf7012 100644 --- a/tests/Mock/ExtendedAggregateRootDecorator.php +++ b/tests/Mock/ExtendedAggregateRootDecorator.php @@ -9,13 +9,13 @@ * Date: 08/26/15 - 19:58 */ -namespace Prooph\EventSourcingTest\Mock; +namespace ProophTest\EventSourcing\Mock; use Prooph\EventSourcing\EventStoreIntegration\AggregateRootDecorator; /** * Class ExtendedAggregateRootDecorator - * @package Prooph\EventSourcingTest\Mock + * @package ProophTest\EventSourcing\Mock */ class ExtendedAggregateRootDecorator extends AggregateRootDecorator { diff --git a/tests/Mock/User.php b/tests/Mock/User.php index f5e704a..9b05c52 100644 --- a/tests/Mock/User.php +++ b/tests/Mock/User.php @@ -9,7 +9,7 @@ * Date: 04/18/14 - 00:04 */ -namespace Prooph\EventSourcingTest\Mock; +namespace ProophTest\EventSourcing\Mock; use Prooph\EventSourcing\AggregateRoot; use Rhumsaa\Uuid\Uuid; @@ -17,7 +17,7 @@ /** * Class User * - * @package Prooph\EventStoreTest\Mock + * @package ProophTest\EventSourcing\Mock * @author Alexander Miertsch */ class User extends AggregateRoot diff --git a/tests/Mock/UserCreated.php b/tests/Mock/UserCreated.php index 6010eae..00152a6 100644 --- a/tests/Mock/UserCreated.php +++ b/tests/Mock/UserCreated.php @@ -9,14 +9,14 @@ * Date: 04/18/14 - 00:29 */ -namespace Prooph\EventSourcingTest\Mock; +namespace ProophTest\EventSourcing\Mock; use Prooph\EventSourcing\AggregateChanged; /** * Class UserCreated * - * @package Prooph\EventStoreTest\Mock + * @package ProophTest\EventSourcing\Mock * @author Alexander Miertsch */ class UserCreated extends AggregateChanged diff --git a/tests/Mock/UserNameChanged.php b/tests/Mock/UserNameChanged.php index f47a7a0..f13cc5e 100644 --- a/tests/Mock/UserNameChanged.php +++ b/tests/Mock/UserNameChanged.php @@ -9,14 +9,14 @@ * Date: 04/18/14 - 00:08 */ -namespace Prooph\EventSourcingTest\Mock; +namespace ProophTest\EventSourcing\Mock; use Prooph\EventSourcing\AggregateChanged; /** * Class UserNameChanged * - * @package Prooph\EventStoreTest\Mock + * @package ProophTest\EventSourcing\Mock * @author Alexander Miertsch */ class UserNameChanged extends AggregateChanged diff --git a/tests/TestCase.php b/tests/TestCase.php index 0d53d83..1a40620 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -9,12 +9,12 @@ * Date: 06/06/14 - 23:05 */ -namespace Prooph\EventSourcingTest; +namespace ProophTest\EventSourcing; /** * Class TestCase * - * @package Prooph\EventSourcingTest + * @package ProophTest\EventSourcing * @author Alexander Miertsch */ class TestCase extends \PHPUnit_Framework_TestCase