コード例 #1
0
 /**
  * @covers ::determineActiveTheme
  */
 public function testDetermineActiveThemeDefaultTheme()
 {
     $theme = 'bartik';
     // When the theme is the system default, an empty string is provided as the
     // theme token. See system_js_settings_alter().
     $theme_token = '';
     $request = new Request([], ['ajax_page_state' => ['theme' => $theme, 'theme_token' => $theme_token]]);
     $this->requestStack->push($request);
     $route_match = RouteMatch::createFromRequest($request);
     $this->tokenGenerator->validate(Argument::cetera())->shouldNotBeCalled();
     $result = $this->negotiator->determineActiveTheme($route_match);
     $this->assertSame($theme, $result);
 }