protected function BlazyManagerUnitTestTrait::setUpUnitServices in Blazy 8
Same name and namespace in other branches
- 8.2 tests/src/Traits/BlazyManagerUnitTestTrait.php \Drupal\Tests\blazy\Traits\BlazyManagerUnitTestTrait::setUpUnitServices()
Setup the unit manager.
5 calls to BlazyManagerUnitTestTrait::setUpUnitServices()
- BlazyAdminExtendedUnitTest::setUp in tests/
src/ Unit/ Form/ BlazyAdminExtendedUnitTest.php - BlazyAdminFormatterUnitTest::setUp in tests/
src/ Unit/ Form/ BlazyAdminFormatterUnitTest.php - BlazyManagerBaseUnitTest::setUp in tests/
src/ Unit/ BlazyManagerBaseUnitTest.php - BlazyManagerUnitTest::setUp in tests/
src/ Unit/ BlazyManagerUnitTest.php - BlazyUnitTest::setUp in tests/
src/ Unit/ BlazyUnitTest.php
File
- tests/
src/ Traits/ BlazyManagerUnitTestTrait.php, line 17
Class
- BlazyManagerUnitTestTrait
- A Trait common for Blazy related service managers.
Namespace
Drupal\Tests\blazy\TraitsCode
protected function setUpUnitServices() {
$this->entityManager = $this
->createMock('Drupal\\Core\\Entity\\EntityManagerInterface');
$this->entityStorage = $this
->createMock('Drupal\\Core\\Entity\\EntityStorageInterface');
$this->entityViewBuilder = $this
->createMock('Drupal\\Core\\Entity\\EntityViewBuilderInterface');
$this->entityTypeMock = $this
->createMock('\\Drupal\\Core\\Entity\\EntityTypeInterface');
$this->entityFieldManager = $this
->createMock('\\Drupal\\Core\\Entity\\EntityFieldManagerInterface');
$this->entityTypeManager = $this
->createMock('\\Drupal\\Core\\Entity\\EntityTypeManagerInterface');
$this->renderer = $this
->createMock('\\Drupal\\Core\\Render\\RendererInterface');
$this->cache = $this
->createMock('\\Drupal\\Core\\Cache\\CacheBackendInterface');
$this->moduleHandler = $this
->getMockBuilder('Drupal\\Core\\Extension\\ModuleHandler')
->disableOriginalConstructor()
->getMock();
$this->token = $this
->getMockBuilder('\\Drupal\\Core\\Utility\\Token')
->disableOriginalConstructor()
->getMock();
$this->token
->expects($this
->any())
->method('replace')
->willReturnArgument(0);
$this->configFactory = $this
->getConfigFactoryStub([
'blazy.settings' => [
'admin_css' => TRUE,
'responsive_image' => TRUE,
'one_pixel' => TRUE,
'blazy' => [
'loadInvisible' => FALSE,
'offset' => 100,
],
],
]);
}