Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/CloudEventSignatureTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function testThrowsAnErrorIfTheSignatureIsNull(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$writtenEvents = $client->writeEvents([
Expand Down Expand Up @@ -76,7 +76,7 @@ public function testThrowsAnErrorIfTheHashVerificationFails(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$writtenEvents = $client->writeEvents([
Expand Down Expand Up @@ -131,7 +131,7 @@ public function testThrowsAnErrorIfTheSignatureVerificationFails(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$writtenEvents = $client->writeEvents([
Expand Down Expand Up @@ -186,7 +186,7 @@ public function testVerifiesTheSignature(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$writtenEvents = $client->writeEvents([
Expand Down
4 changes: 2 additions & 2 deletions tests/CloudEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function testVerifiesTheEventHash(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$writtenEvents = $this->client->writeEvents([
Expand All @@ -47,7 +47,7 @@ public function testThrowsAnErrorIfTheEventHashIsInvalid(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$writtenEvents = $this->client->writeEvents([
Expand Down
22 changes: 11 additions & 11 deletions tests/ObserveEventsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function testObserverAllEventsFromTheGivenSubject(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$secondEvent = new EventCandidate(
Expand All @@ -48,7 +48,7 @@ public function testObserverAllEventsFromTheGivenSubject(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 42,
],
]
);

$this->client->writeEvents([
Expand Down Expand Up @@ -77,7 +77,7 @@ public function testObserversRecursively(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$secondEvent = new EventCandidate(
Expand All @@ -86,7 +86,7 @@ public function testObserversRecursively(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 42,
],
]
);

$this->client->writeEvents([
Expand Down Expand Up @@ -115,7 +115,7 @@ public function testObserversWithLowerBound(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$secondEvent = new EventCandidate(
Expand All @@ -124,7 +124,7 @@ public function testObserversWithLowerBound(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 42,
],
]
);

$this->client->writeEvents([
Expand Down Expand Up @@ -160,7 +160,7 @@ public function testObserversFromLatestEvent(): void
type: 'io.eventsourcingdb.test.foo',
data: [
'value' => 23,
],
]
);

$secondEvent = new EventCandidate(
Expand All @@ -169,7 +169,7 @@ public function testObserversFromLatestEvent(): void
type: 'io.eventsourcingdb.test.bar',
data: [
'value' => 42,
],
]
);

$this->client->writeEvents([
Expand Down Expand Up @@ -206,7 +206,7 @@ public function testObserverAllEventsWithAbortInLoop(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$secondEvent = new EventCandidate(
Expand All @@ -215,7 +215,7 @@ public function testObserverAllEventsWithAbortInLoop(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 42,
],
]
);

$this->client->writeEvents([
Expand Down Expand Up @@ -249,7 +249,7 @@ public function testObserverAllEventsPerformanceBenchmark(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => rand(1000, 9999),
],
]
);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/ReadEventTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function testReadAnExistingEventType(): void
type: 'io.eventsourcingdb.test.foo',
data: [
'value' => 23,
],
]
);

$secondEvent = new EventCandidate(
Expand All @@ -42,7 +42,7 @@ public function testReadAnExistingEventType(): void
type: 'io.eventsourcingdb.test.bar',
data: [
'value' => 42,
],
]
);

$this->client->writeEvents([
Expand Down
8 changes: 4 additions & 4 deletions tests/ReadEventTypesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function testReadsAllEventTypes(): void
type: 'io.eventsourcingdb.test.foo',
data: [
'value' => 23,
],
]
);

$secondEvent = new EventCandidate(
Expand All @@ -39,7 +39,7 @@ public function testReadsAllEventTypes(): void
type: 'io.eventsourcingdb.test.bar',
data: [
'value' => 42,
],
]
);

$this->client->writeEvents([
Expand Down Expand Up @@ -70,8 +70,8 @@ public function testSupportsReadingEventSchemas(): void
'properties' => [
'value' => [
'type' => 'number',
],
],
]
]
'required' => ['value'],
'additionalProperties' => false,
];
Expand Down
28 changes: 14 additions & 14 deletions tests/ReadEventsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function testReadsAllEventsFromTheGivenSubject(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$secondEvent = new EventCandidate(
Expand All @@ -46,7 +46,7 @@ public function testReadsAllEventsFromTheGivenSubject(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 42,
],
]
);

$this->client->writeEvents([
Expand All @@ -72,7 +72,7 @@ public function testReadsRecursively(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$secondEvent = new EventCandidate(
Expand All @@ -81,7 +81,7 @@ public function testReadsRecursively(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 42,
],
]
);

$this->client->writeEvents([
Expand All @@ -107,7 +107,7 @@ public function testReadsChronologically(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$secondEvent = new EventCandidate(
Expand All @@ -116,7 +116,7 @@ public function testReadsChronologically(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 42,
],
]
);

$this->client->writeEvents([
Expand Down Expand Up @@ -151,7 +151,7 @@ public function testReadsAntiChronologically(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$secondEvent = new EventCandidate(
Expand All @@ -160,7 +160,7 @@ public function testReadsAntiChronologically(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 42,
],
]
);

$this->client->writeEvents([
Expand Down Expand Up @@ -195,7 +195,7 @@ public function testReadsWithLowerBound(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$secondEvent = new EventCandidate(
Expand All @@ -204,7 +204,7 @@ public function testReadsWithLowerBound(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 42,
],
]
);

$this->client->writeEvents([
Expand Down Expand Up @@ -236,7 +236,7 @@ public function testReadsWithUpperBound(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$secondEvent = new EventCandidate(
Expand All @@ -245,7 +245,7 @@ public function testReadsWithUpperBound(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 42,
],
]
);

$this->client->writeEvents([
Expand Down Expand Up @@ -277,7 +277,7 @@ public function testReadsFromLatestEvent(): void
type: 'io.eventsourcingdb.test.foo',
data: [
'value' => 23,
],
]
);

$secondEvent = new EventCandidate(
Expand All @@ -286,7 +286,7 @@ public function testReadsFromLatestEvent(): void
type: 'io.eventsourcingdb.test.bar',
data: [
'value' => 42,
],
]
);

$this->client->writeEvents([
Expand Down
8 changes: 4 additions & 4 deletions tests/ReadSubjectsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function testReadsAllSubjects(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$secondEvent = new EventCandidate(
Expand All @@ -37,7 +37,7 @@ public function testReadsAllSubjects(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 42,
],
]
);

$this->client->writeEvents([
Expand Down Expand Up @@ -65,7 +65,7 @@ public function testReadsAllSubjectsFromTheBaseSubject(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 23,
],
]
);

$secondEvent = new EventCandidate(
Expand All @@ -74,7 +74,7 @@ public function testReadsAllSubjectsFromTheBaseSubject(): void
type: 'io.eventsourcingdb.test',
data: [
'value' => 42,
],
]
);

$this->client->writeEvents([
Expand Down
8 changes: 4 additions & 4 deletions tests/RegisterEventSchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public function testRegisterAnEventSchema(): void
'properties' => [
'value' => [
'type' => 'number',
],
],
]
]
'required' => ['value'],
'additionalProperties' => false,
];
Expand All @@ -36,8 +36,8 @@ public function testThrowsAnErrorIfAnEventSchemaIsAlreadyRegistered(): void
'properties' => [
'value' => [
'type' => 'number',
],
],
]
]
'required' => ['value'],
'additionalProperties' => false,
];
Expand Down
Loading
Loading