trait AcquiadamLoggerFactoryTrait in Media: Acquia DAM 8
A shared mock logger channel.
Hierarchy
- trait \Drupal\Tests\media_acquiadam\Traits\AcquiadamLoggerFactoryTrait
4 files declare their use of AcquiadamLoggerFactoryTrait
- AcquiadamServiceTest.php in tests/
src/ Unit/ AcquiadamServiceTest.php - AssetFileEntityHelperTest.php in tests/
src/ Unit/ AssetFileEntityHelperTest.php - AssetRefreshManagerTest.php in tests/
src/ Unit/ AssetRefreshManagerTest.php - OauthTest.php in tests/
src/ Unit/ OauthTest.php
File
- tests/
src/ Traits/ AcquiadamLoggerFactoryTrait.php, line 11
Namespace
Drupal\Tests\media_acquiadam\TraitsView source
trait AcquiadamLoggerFactoryTrait {
/**
* Gets a stubbed out Logger factory for Media: Acquia DAM test usage.
*
* @return \PHPUnit\Framework\MockObject\MockObject|\Drupal\Core\Logger\LoggerChannelFactoryInterface
* A mock LoggerChannelFactoryInstance with a media_acquiadam channel.
*/
protected function getLoggerFactoryStub() {
$logger_channel = $this
->getMockBuilder(LoggerChannelInterface::class)
->disableOriginalConstructor()
->getMock();
$logger_factory = $this
->getMockBuilder(LoggerChannelFactoryInterface::class)
->disableOriginalConstructor()
->getMock();
$logger_factory
->method('get')
->with('media_acquiadam')
->willReturn($logger_channel);
return $logger_factory;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AcquiadamLoggerFactoryTrait:: |
protected | function | Gets a stubbed out Logger factory for Media: Acquia DAM test usage. |