function DrupalTest::testQueue
Same name in other branches
- 8.9.x core/tests/Drupal/Tests/Core/DrupalTest.php \Drupal\Tests\Core\DrupalTest::testQueue()
- 10 core/tests/Drupal/Tests/Core/DrupalTest.php \Drupal\Tests\Core\DrupalTest::testQueue()
- 11.x core/tests/Drupal/Tests/Core/DrupalTest.php \Drupal\Tests\Core\DrupalTest::testQueue()
Tests the queue() method.
@covers ::queue
File
-
core/
tests/ Drupal/ Tests/ Core/ DrupalTest.php, line 181
Class
- DrupalTest
- Tests the Drupal class.
Namespace
Drupal\Tests\CoreCode
public function testQueue() {
$queue = $this->getMockBuilder('Drupal\\Core\\Queue\\QueueFactory')
->disableOriginalConstructor()
->getMock();
$queue->expects($this->once())
->method('get')
->with('test_queue', TRUE)
->willReturn(TRUE);
$this->setMockContainerService('queue', $queue);
$this->assertNotNull(\Drupal::queue('test_queue', TRUE));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.