Skip to content

Commit

Permalink
SA fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielBadura committed Feb 8, 2024
1 parent 73a1bb5 commit 3c14d09
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/EventBus/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
* archived?: bool,
* ...<string, mixed>
* }
*
* @phpstan-type Headers = array{
* aggregateName?: string,
* aggregateId?: string,
Expand Down
1 change: 0 additions & 1 deletion src/Store/DoctrineHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Doctrine\DBAL\Types\Type;
use Doctrine\DBAL\Types\Types;

use function dd;
use function is_array;
use function is_bool;
use function is_int;
Expand Down
11 changes: 6 additions & 5 deletions tests/Unit/Aggregate/AggregateRootTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,19 @@ public function testInvalidAggregateId(): void
public function testUpdateMetadataFactory(): void
{
$newFactory = new class implements AggregateRootMetadataFactory {
public int $calledTimes = 0;
public bool $called = false;

public function metadata(string $aggregate): AggregateRootMetadata
{
$this->calledTimes++;
$this->called = true;

return new AggregateRootMetadata($aggregate, 'name', 'id' , [], [], false, null);
return new AggregateRootMetadata($aggregate, 'name', 'id', [], [], false, null);
}
};

Profile::setMetadataFactory($newFactory);
self::assertSame(0, $newFactory->calledTimes);
self::assertFalse($newFactory->called);
Profile::getMetadata();
self::assertSame(1, $newFactory->calledTimes);
self::assertTrue($newFactory->called);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public function testIncludeEvent(): void

self::assertSame([$message], $result);
}

public function testHeaderNotSet(): void
{
$middleware = new ExcludeArchivedEventMiddleware();
Expand Down

0 comments on commit 3c14d09

Please sign in to comment.