public function ConfigImporterTest::testGetConfigStorage in Currency 8.3
@covers ::getConfigStorage @covers ::setConfigStorage
File
- tests/
src/ Unit/ ConfigImporterTest.php, line 111
Class
- ConfigImporterTest
- @coversDefaultClass \Drupal\currency\ConfigImporter
Namespace
Drupal\Tests\currency\UnitCode
public function testGetConfigStorage() {
$method_get = new \ReflectionMethod($this->sut, 'getConfigStorage');
$method_get
->setAccessible(TRUE);
FileCacheFactory::setPrefix('prefix');
$extension = $this
->getMockBuilder(Extension::class)
->disableOriginalConstructor()
->getMock();
$this->moduleHandler
->expects($this
->atLeastOnce())
->method('getModule')
->willReturn($extension);
$this
->assertInstanceof(StorageInterface::class, $method_get
->invoke($this->sut));
$config_storage = $this
->createMock(StorageInterface::class);
$this->sut
->setConfigStorage($config_storage);
$this
->assertSame($config_storage, $method_get
->invoke($this->sut));
}