Skip to content

Commit a3f4ea8

Browse files
oliverkleeSam Tuke
authored andcommitted
[FOLLOWUP] Use correct association count in tests for cascading removal (#272)
The tests used the wrong variable names and only were green by pure coincidence.
1 parent 4392e90 commit a3f4ea8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
2020
### Removed
2121

2222
### Fixed
23-
- Remove associated subscriptions when a subscriber list or subscriber is removed (#271)
23+
- Remove associated subscriptions when a subscriber list or subscriber is removed (#271, #272)
2424
- Always truncate the DB tables after an integration test (#259)
2525
- Adapt the system tests to possible HTTP errors (#256)
2626

tests/Integration/Domain/Repository/Messaging/SubscriberListRepositoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,6 @@ public function removeAlsoRemovesAssociatedSubscriptions()
288288

289289
$newNumberOfSubscriptions = count($this->subscriptionRepository->findAll());
290290
$numberOfRemovedSubscriptions = $initialNumberOfSubscriptions - $newNumberOfSubscriptions;
291-
static::assertSame($numberOfAssociatedSubscriptions, $newNumberOfSubscriptions);
291+
static::assertSame($numberOfAssociatedSubscriptions, $numberOfRemovedSubscriptions);
292292
}
293293
}

tests/Integration/Domain/Repository/Subscription/SubscriberRepositoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,6 @@ public function removeAlsoRemovesAssociatedSubscriptions()
293293

294294
$newNumberOfSubscriptions = count($this->subscriptionRepository->findAll());
295295
$numberOfRemovedSubscriptions = $initialNumberOfSubscriptions - $newNumberOfSubscriptions;
296-
static::assertSame($numberOfAssociatedSubscriptions, $newNumberOfSubscriptions);
296+
static::assertSame($numberOfAssociatedSubscriptions, $numberOfRemovedSubscriptions);
297297
}
298298
}

0 commit comments

Comments
 (0)