Issue #2073871 by nick_schuch: TourTestBasic should setup Seven has the default admin theme.

8.0.x
webchick 2013-09-10 01:28:26 -07:00
parent d2cdb1700a
commit 027b0f9e59
5 changed files with 44 additions and 0 deletions

View File

@ -48,6 +48,20 @@ abstract class TourTestBasic extends TourTestBase {
protected function setUp() {
parent::setUp();
// Make sure we are using distinct default and administrative themes for
// the duration of these tests.
$this->container->get('config.factory')
->get('system.theme')
->set('default', 'bartik')
->save();
theme_enable(array('seven'));
$this->container->get('config.factory')
->get('system.theme')
->set('admin', 'seven')
->save();
$this->permissions[] = 'view the administration theme';
//Create an admin user to view tour tips.
$this->adminUser = $this->drupalCreateUser($this->permissions);
$this->drupalLogin($this->adminUser);

View File

@ -13,6 +13,14 @@ tips:
weight: "1"
attributes:
data-id: tour-test-1
tour-test-action:
id: tour-test-3
plugin: text
label: The action
body: The action button of awesome
weight: "2"
attributes:
data-class: button-action
tour-test-3:
id: tour-test-3
plugin: image

View File

@ -0,0 +1,5 @@
tour_test_action:
route_name: tour_test_1_action
title: 'Tour test action'
appears_on:
- tour_test_1

View File

@ -7,6 +7,16 @@
use Drupal\Core\Entity\EntityInterface;
/**
* Implements hook_admin_paths().
*/
function tour_test_admin_paths() {
$paths = array(
'tour-test-1' => TRUE,
);
return $paths;
}
/**
* Implements hook_menu().
*/

View File

@ -5,6 +5,13 @@ tour_test_1:
requirements:
_access: 'TRUE'
tour_test_1_action:
pattern : 'tour-test-1/action'
defaults:
_content: '\Drupal\tour_test\Controller\TourTestController::tourTest1'
requirements:
_access: 'TRUE'
tour_test_2:
pattern : 'tour-test-2/subpath'
defaults: