Issue #2983121 by ziomizar, scuba_fly, Lendude: Remove or deprecate TourTest webtest

merge-requests/1654/head
Alex Pott 2018-07-05 16:59:42 +01:00
parent 5a80703c4c
commit 0d8a744516
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
1 changed files with 0 additions and 83 deletions

View File

@ -1,83 +0,0 @@
<?php
namespace Drupal\tour\Tests;
/**
* A legacy test for \Drupal\tour\Tests\TourTestBase.
*
* @group tour
*/
class TourTest extends TourTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = ['block', 'tour', 'locale', 'language', 'tour_test'];
/**
* Tour tip attributes to be tested. Keyed by the path.
*
* @var array
* An array of tip attributes, keyed by path.
*/
protected $tips = [
'tour-test-1' => [
'data-id' => 'tour-test-1',
'data-class' => 'tour-test-1',
],
];
/**
* An admin user with administrative permissions for tour.
*
* @var \Drupal\user\UserInterface
*/
protected $adminUser;
/**
* The permissions required for a logged in user to test tour tips.
*
* @var array
* A list of permissions.
*/
protected $permissions = ['access tour'];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
// Make sure we are using distinct default and administrative themes for
// the duration of these tests.
$this->container->get('theme_handler')->install(['bartik', 'seven']);
$this->config('system.theme')
->set('default', 'bartik')
->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);
$this->drupalPlaceBlock('local_actions_block', [
'theme' => 'seven',
'region' => 'content',
]);
}
/**
* A simple tip test.
*/
public function testTips() {
foreach ($this->tips as $path => $attributes) {
$this->drupalGet($path);
$this->assertTourTips($attributes);
}
}
}