You are here

protected function SimplenewsSubscribeTest::resetSubscribers in Simplenews 3.x

Same name and namespace in other branches
  1. 8.2 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 800

Class

SimplenewsSubscribeTest
Un/subscription of anonymous and authenticated users.

Namespace

Drupal\Tests\simplenews\Functional

Code

protected function resetSubscribers() {
  $storage = \Drupal::entityTypeManager()
    ->getStorage('simplenews_subscriber');
  $storage
    ->delete($storage
    ->loadMultiple());
}