You are here

protected function SimplenewsSubscribeTest::countSubscribers in Simplenews 8.2

Same name and namespace in other branches
  1. 3.x tests/src/Functional/SimplenewsSubscribeTest.php \Drupal\Tests\simplenews\Functional\SimplenewsSubscribeTest::countSubscribers()

Gets the number of subscribers entities.

1 call to SimplenewsSubscribeTest::countSubscribers()
SimplenewsSubscribeTest::testSubscribeAuthenticated in tests/src/Functional/SimplenewsSubscribeTest.php
TestSubscribeAuthenticated.

File

tests/src/Functional/SimplenewsSubscribeTest.php, line 960

Class

SimplenewsSubscribeTest
Un/subscription of anonymous and authenticated users.

Namespace

Drupal\Tests\simplenews\Functional

Code

protected function countSubscribers() {
  return \Drupal::entityQuery('simplenews_subscriber')
    ->count()
    ->execute();
}