You are here

class QueueTest in MongoDB 8

Tests queue functions.

@group Queue

Hierarchy

  • class \Drupal\mongodb\Tests\QueueTest extends \Drupal\system\Tests\Queue\QueueTest

Expanded class hierarchy of QueueTest

File

src/Tests/QueueTest.php, line 17
Definition of Drupal\mongodb\Tests\QueueTest.

Namespace

Drupal\mongodb\Tests
View source
class QueueTest extends \Drupal\system\Tests\Queue\QueueTest {

  /**
   * Modules to enable.
   *
   * @var array
   */
  public static $modules = array(
    'mongodb',
  );
  public static function getInfo() {
    return array(
      'name' => 'Queue',
      'description' => 'Tests the mongo queue functions.',
      'group' => 'MongoDB',
    );
  }

  /**
   * Tests MongoDB queue.
   */
  public function testMongoDBQueue() {

    // Create two queues.
    $queue1 = new Queue(\Drupal::service('mongo'), $this
      ->randomName());
    $queue1
      ->createQueue();
    $queue2 = new Queue(\Drupal::service('mongo'), $this
      ->randomName());
    $queue2
      ->createQueue();
    $this
      ->queueTest($queue1, $queue2);
  }

  /**
   * Overrides \Drupal\system\Tests\Queue\QueueTestQueueTest::testSystemQueue().
   *
   * We override tests from core class we exted to prevent them from running.
   */
  public function testSystemQueue() {
  }

  /**
   * Overrides \Drupal\system\Tests\Queue\QueueTestQueueTest::testMemoryQueue().
   *
   * We override tests from core class we exted to prevent them from running.
   */
  public function testMemoryQueue() {
  }

}

Members

Namesort descending Modifiers Type Description Overrides
QueueTest::$modules public static property Modules to enable.
QueueTest::getInfo public static function
QueueTest::testMemoryQueue public function Overrides \Drupal\system\Tests\Queue\QueueTestQueueTest::testMemoryQueue().
QueueTest::testMongoDBQueue public function Tests MongoDB queue.
QueueTest::testSystemQueue public function Overrides \Drupal\system\Tests\Queue\QueueTestQueueTest::testSystemQueue().