You are here

protected function SmtpUnitTest::getQueueCount in SMTP Authentication Support 7

Same name and namespace in other branches
  1. 7.2 tests/smtp.unit.test \SmtpUnitTest::getQueueCount()

Get the number of emails in a specific queue.

Parameters

string $queue: The name of the queue to add the emails to.

Return value

int The number of messages found in the requested queue.

2 calls to SmtpUnitTest::getQueueCount()
SmtpUnitTest::testFailQueue in tests/smtp.unit.test
Confirm the queue works.
SmtpUnitTest::testQueue in tests/smtp.unit.test
Confirm the queue works.

File

tests/smtp.unit.test, line 261
Some tests for the SMTP module.

Class

SmtpUnitTest
@file Some tests for the SMTP module.

Code

protected function getQueueCount($queue = 'smtp_send_queue') {
  return db_query("SELECT count('name') FROM {queue} WHERE name = :queue", array(
    ':queue' => $queue,
  ))
    ->fetchField();
}