You are here

private static function CleanerTest::getWatchdogLogsCount in Cleaner 8

Get Watchdog logs count.

Return value

int Logs count.

1 call to CleanerTest::getWatchdogLogsCount()
CleanerTest::testCleanerClearWatchdog in src/Tests/CleanerTest.php
Test Cleaner clearing watchdog logs.

File

src/Tests/CleanerTest.php, line 91

Class

CleanerTest
Class CleanerTest.

Namespace

Drupal\cleaner\Tests

Code

private static function getWatchdogLogsCount() {
  $logs = \Drupal::database()
    ->select('watchdog', 'w')
    ->fields('w', [
    'wid',
  ])
    ->execute()
    ->fetchCol();
  return count($logs);
}