You are here

protected function SimplenewsSubscribeTest::resetSubscribers in Simplenews 8

Delete all subscriber entities ready for the next test.

1 call to SimplenewsSubscribeTest::resetSubscribers()
SimplenewsSubscribeTest::testSubscribeAuthenticated in src/Tests/SimplenewsSubscribeTest.php
testSubscribeAuthenticated

File

src/Tests/SimplenewsSubscribeTest.php, line 937
Simplenews subscribe test functions.

Class

SimplenewsSubscribeTest
(un)subscription of anonymous and authenticated users.

Namespace

Drupal\simplenews\Tests

Code

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