You are here

public function VisualDiffThemeNegotiatorTest::testDetermineActiveTheme in Diff 8

@covers ::determineActiveTheme

File

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

Class

VisualDiffThemeNegotiatorTest
Tests theme negotiator.

Namespace

Drupal\Tests\diff\Unit

Code

public function testDetermineActiveTheme() {
  $config = $this
    ->prophesize(ImmutableConfig::class);
  $config
    ->get('default')
    ->willReturn('the_default_theme');
  $this->configFactory
    ->get('system.theme')
    ->willReturn($config
    ->reveal());
  $route_match = $this
    ->prophesize(RouteMatchInterface::class);
  $result = $this->themeNegotiator
    ->determineActiveTheme($route_match
    ->reveal());
  $this
    ->assertSame('the_default_theme', $result);
}