protected function SimplenewsSubscribeTest::resetSubscribers in Simplenews 8.2
Same name and namespace in other branches
- 3.x tests/src/Functional/SimplenewsSubscribeTest.php \Drupal\Tests\simplenews\Functional\SimplenewsSubscribeTest::resetSubscribers()
Delete all subscriber entities ready for the next test.
1 call to SimplenewsSubscribeTest::resetSubscribers()
- SimplenewsSubscribeTest::testSubscribeAuthenticated in tests/
src/ Functional/ SimplenewsSubscribeTest.php - TestSubscribeAuthenticated.
File
- tests/
src/ Functional/ SimplenewsSubscribeTest.php, line 967
Class
- SimplenewsSubscribeTest
- Un/subscription of anonymous and authenticated users.
Namespace
Drupal\Tests\simplenews\FunctionalCode
protected function resetSubscribers() {
$storage = \Drupal::entityTypeManager()
->getStorage('simplenews_subscriber');
$storage
->delete($storage
->loadMultiple());
}