Skip to content

Commit a457a90

Browse files
committed
fix tests
1 parent 6507fbf commit a457a90

File tree

11 files changed

+25
-30
lines changed

11 files changed

+25
-30
lines changed

src/Factory/AggregateRootRegistryFactory.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
use Patchlevel\EventSourcing\Metadata\AggregateRoot\AttributeAggregateRootRegistryFactory;
99
use Psr\Container\ContainerInterface;
1010

11-
use function assert;
12-
1311
/**
1412
* @psalm-type Config = array{
1513
* paths: list<string>,
@@ -21,7 +19,6 @@ final class AggregateRootRegistryFactory extends Factory
2119
protected function createWithConfig(ContainerInterface $container): AggregateRootRegistry
2220
{
2321
$config = $this->retrieveConfig($container, 'aggregate');
24-
assert($config instanceof Config);
2522

2623
$aggregateRootRegistry = new AggregateRootRegistry($config['classes']);
2724

tests/Integration/Default/Aggregate/Profile.php renamed to tests/Integration/Aggregate/Profile.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\Aggregate;
5+
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration\Aggregate;
66

77
use Patchlevel\EventSourcing\Aggregate\AggregateRoot;
88
use Patchlevel\EventSourcing\Attribute\Aggregate;
99
use Patchlevel\EventSourcing\Attribute\Apply;
1010
use Patchlevel\EventSourcing\Attribute\Normalize;
1111
use Patchlevel\EventSourcing\Attribute\Snapshot;
12-
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\Events\ProfileCreated;
13-
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\Normalizer\ProfileIdNormalizer;
14-
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\ProfileId;
12+
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Events\ProfileCreated;
13+
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Normalizer\ProfileIdNormalizer;
14+
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\ProfileId;
1515

1616
#[Aggregate('profile')]
1717
#[Snapshot('default', 100)]

tests/Integration/Default/DefaultContainerTest.php renamed to tests/Integration/DefaultContainerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default;
5+
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration;
66

77
use Patchlevel\EventSourcingPsrContainer\ConfigBuilder;
88
use Patchlevel\EventSourcingPsrContainer\DefaultContainer;
9-
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\Aggregate\Profile;
10-
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\Processor\SendEmailProcessor;
11-
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\Projection\ProfileProjection;
9+
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Aggregate\Profile;
10+
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Processor\SendEmailProcessor;
11+
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Projection\ProfileProjection;
1212
use PHPUnit\Framework\TestCase;
1313

1414
/**

tests/Integration/Default/Events/ProfileCreated.php renamed to tests/Integration/Events/ProfileCreated.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\Events;
5+
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration\Events;
66

77
use Patchlevel\EventSourcing\Attribute\Event;
88
use Patchlevel\EventSourcing\Attribute\Normalize;
9-
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\Normalizer\ProfileIdNormalizer;
10-
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\ProfileId;
9+
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Normalizer\ProfileIdNormalizer;
10+
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\ProfileId;
1111

1212
#[Event('profile.created')]
1313
final class ProfileCreated

tests/Integration/Default/LaminasServiceManagerTest.php renamed to tests/Integration/LaminasServiceManagerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default;
5+
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration;
66

77
use Laminas\ServiceManager\ServiceManager;
88
use Patchlevel\EventSourcing\Repository\RepositoryManager;
@@ -11,9 +11,9 @@
1111
use Patchlevel\EventSourcingPsrContainer\Factory\ConnectionFactory;
1212
use Patchlevel\EventSourcingPsrContainer\Factory\RepositoryManagerFactory;
1313
use Patchlevel\EventSourcingPsrContainer\Factory\SchemaDirectorFactory;
14-
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\Aggregate\Profile;
15-
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\Processor\SendEmailProcessor;
16-
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\Projection\ProfileProjection;
14+
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Aggregate\Profile;
15+
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Processor\SendEmailProcessor;
16+
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Projection\ProfileProjection;
1717
use PHPUnit\Framework\TestCase;
1818
use Psr\Container\ContainerInterface;
1919

tests/Integration/Default/MessageDecorator/FooMessageDecorator.php renamed to tests/Integration/MessageDecorator/FooMessageDecorator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\MessageDecorator;
5+
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration\MessageDecorator;
66

77
use Patchlevel\EventSourcing\EventBus\Decorator\MessageDecorator;
88
use Patchlevel\EventSourcing\EventBus\Message;

tests/Integration/Default/Normalizer/ProfileIdNormalizer.php renamed to tests/Integration/Normalizer/ProfileIdNormalizer.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\Normalizer;
5+
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration\Normalizer;
66

77
use InvalidArgumentException;
88
use Patchlevel\EventSourcing\Serializer\Normalizer\Normalizer;
9-
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\ProfileId;
10-
9+
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\ProfileId;
1110
use function is_string;
1211

1312
final class ProfileIdNormalizer implements Normalizer

tests/Integration/Default/Processor/SendEmailProcessor.php renamed to tests/Integration/Processor/SendEmailProcessor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\Processor;
5+
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration\Processor;
66

77
use Patchlevel\EventSourcing\EventBus\Listener;
88
use Patchlevel\EventSourcing\EventBus\Message;
9-
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\Events\ProfileCreated;
10-
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\SendEmailMock;
9+
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Events\ProfileCreated;
10+
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\SendEmailMock;
1111

1212
final class SendEmailProcessor implements Listener
1313
{

tests/Integration/Default/ProfileId.php renamed to tests/Integration/ProfileId.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default;
5+
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration;
66

77
final class ProfileId
88
{

tests/Integration/Default/Projection/ProfileProjection.php renamed to tests/Integration/Projection/ProfileProjection.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\Projection;
5+
namespace Patchlevel\EventSourcingPsrContainer\Tests\Integration\Projection;
66

77
use Doctrine\DBAL\Connection;
88
use Doctrine\DBAL\Schema\Table;
@@ -11,8 +11,7 @@
1111
use Patchlevel\EventSourcing\Attribute\Handle;
1212
use Patchlevel\EventSourcing\EventBus\Message;
1313
use Patchlevel\EventSourcing\Projection\Projector\Projector;
14-
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Default\Events\ProfileCreated;
15-
14+
use Patchlevel\EventSourcingPsrContainer\Tests\Integration\Events\ProfileCreated;
1615
use function assert;
1716

1817
final class ProfileProjection implements Projector

0 commit comments

Comments
 (0)