public function DrupalTest::testQueue in Zircon Profile 8
Same name and namespace in other branches
- 8.0 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 169 - Contains \Drupal\Tests\Core\DrupalTest.
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)
->will($this
->returnValue(TRUE));
$this
->setMockContainerService('queue', $queue);
$this
->assertNotNull(\Drupal::queue('test_queue', TRUE));
}