You are here

public function ContentHubExportQueueControllerTest::testGetQueueCount in Acquia Content Hub 8

Test the getQueueCount method.

@covers ::getQueueCount

File

tests/src/Unit/Controller/ContentHubExportQueueControllerTest.php, line 99

Class

ContentHubExportQueueControllerTest
PHPUnit test for the ContentHubExportQueueController class.

Namespace

Drupal\Tests\acquia_contenthub\Unit\Controller

Code

public function testGetQueueCount() {
  $queue = $this
    ->createMock('Drupal\\Core\\Queue\\QueueInterface');
  $queue
    ->method('numberOfItems')
    ->willReturn(100);
  $this->queueFactory
    ->method('get')
    ->with('acquia_contenthub_export_queue')
    ->willReturn($queue);
  $count = $this->contentHubExportQueueController
    ->getQueueCount();
  $this
    ->assertEquals($count, 100);
}