You are here

public function StorageFactoryTest::testGetConfiguredStorage in Radioactivity 4.0.x

Same name and namespace in other branches
  1. 8.3 tests/src/Unit/StorageFactoryTest.php \Drupal\Tests\radioactivity\Unit\StorageFactoryTest::testGetConfiguredStorage()

@covers ::getConfiguredStorage @dataProvider providerGetConfiguredStorage

File

tests/src/Unit/StorageFactoryTest.php, line 119

Class

StorageFactoryTest
@coversDefaultClass \Drupal\radioactivity\StorageFactory @group radioactivity

Namespace

Drupal\Tests\radioactivity\Unit

Code

public function testGetConfiguredStorage($configType, $storageType) {
  $sut = $this
    ->getMockBuilder('Drupal\\radioactivity\\StorageFactory')
    ->setMethods([
    'get',
  ])
    ->setConstructorArgs([
    $this->configFactory,
    $this->classResolver,
  ])
    ->getMock();
  $sut
    ->expects($this
    ->once())
    ->method('get')
    ->with($this
    ->equalTo($storageType));
  $this
    ->setConfig($configType, '');
  $sut
    ->getConfiguredStorage();
}