You are here

protected function AssetCollectorTest::getThemeHandlerMock in Entity Print 8.2

Gets the theme handler mock.

File

tests/src/Unit/AssetCollectorTest.php, line 46

Class

AssetCollectorTest
Test the asset collector service.

Namespace

Drupal\Tests\entity_print\Unit

Code

protected function getThemeHandlerMock() {
  $theme = $this
    ->prophesize(Extension::class);
  $theme
    ->getPathname()
    ->willReturn('info_file_path');
  $theme_handler = $this
    ->prophesize(ThemeHandlerInterface::class);
  $theme_handler
    ->getDefault()
    ->willReturn('default_theme');
  $theme_handler
    ->getTheme('default_theme')
    ->willReturn($theme);
  return $theme_handler;
}