Issue #2073871 by nick_schuch: TourTestBasic should setup Seven has the default admin theme.
parent
d2cdb1700a
commit
027b0f9e59
|
@ -48,6 +48,20 @@ abstract class TourTestBasic extends TourTestBase {
|
||||||
|
|
||||||
protected function setUp() {
|
protected function setUp() {
|
||||||
parent::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.
|
//Create an admin user to view tour tips.
|
||||||
$this->adminUser = $this->drupalCreateUser($this->permissions);
|
$this->adminUser = $this->drupalCreateUser($this->permissions);
|
||||||
$this->drupalLogin($this->adminUser);
|
$this->drupalLogin($this->adminUser);
|
||||||
|
|
|
@ -13,6 +13,14 @@ tips:
|
||||||
weight: "1"
|
weight: "1"
|
||||||
attributes:
|
attributes:
|
||||||
data-id: tour-test-1
|
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:
|
tour-test-3:
|
||||||
id: tour-test-3
|
id: tour-test-3
|
||||||
plugin: image
|
plugin: image
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
tour_test_action:
|
||||||
|
route_name: tour_test_1_action
|
||||||
|
title: 'Tour test action'
|
||||||
|
appears_on:
|
||||||
|
- tour_test_1
|
|
@ -7,6 +7,16 @@
|
||||||
|
|
||||||
use Drupal\Core\Entity\EntityInterface;
|
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().
|
* Implements hook_menu().
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -5,6 +5,13 @@ tour_test_1:
|
||||||
requirements:
|
requirements:
|
||||||
_access: 'TRUE'
|
_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:
|
tour_test_2:
|
||||||
pattern : 'tour-test-2/subpath'
|
pattern : 'tour-test-2/subpath'
|
||||||
defaults:
|
defaults:
|
||||||
|
|
Loading…
Reference in New Issue