Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\toolbar\Ajax\SetSubtreesCommand.
|
||||
*/
|
||||
|
||||
namespace Drupal\toolbar\Ajax;
|
||||
|
||||
use Drupal\Core\Ajax\CommandInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\toolbar\Controller\ToolbarController.
|
||||
*/
|
||||
|
||||
namespace Drupal\toolbar\Controller;
|
||||
|
||||
use Drupal\Component\Utility\Crypt;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\toolbar\Element\Toolbar.
|
||||
*/
|
||||
|
||||
namespace Drupal\toolbar\Element;
|
||||
|
||||
use Drupal\Component\Utility\Html;
|
||||
|
@ -61,7 +56,7 @@ class Toolbar extends RenderElement {
|
|||
* rendering to ensure that it is built only if it will be displayed.
|
||||
*
|
||||
* @param array $element
|
||||
* A renderable array.
|
||||
* A renderable array.
|
||||
*
|
||||
* @return array
|
||||
* A renderable array.
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\toolbar\Element\ToolbarItem.
|
||||
*/
|
||||
|
||||
namespace Drupal\toolbar\Element;
|
||||
|
||||
use Drupal\Core\Render\Element\RenderElement;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\toolbar\Menu\ToolbarMenuLinkTree.
|
||||
*/
|
||||
|
||||
namespace Drupal\toolbar\Menu;
|
||||
|
||||
use Drupal\Core\Menu\MenuLinkTree;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\toolbar\PageCache\AllowToolbarPath.
|
||||
*/
|
||||
|
||||
namespace Drupal\toolbar\PageCache;
|
||||
|
||||
use Drupal\Core\PageCache\RequestPolicyInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\toolbar\Tests\ToolbarAdminMenuTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\toolbar\Tests;
|
||||
|
||||
use Drupal\Core\Language\LanguageInterface;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\toolbar\Tests\ToolbarCacheContextsTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\toolbar\Tests;
|
||||
|
||||
use Drupal\Core\Cache\Cache;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\toolbar\Tests\ToolbarHookToolbarTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\toolbar\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\toolbar\Tests\ToolbarMenuTranslationTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\toolbar\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Test module.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_toolbar_alter().
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
namespace Drupal\Tests\toolbar\FunctionalJavascript;
|
||||
|
||||
use Drupal\FunctionalJavascriptTests\JavascriptTestBase;
|
||||
|
||||
/**
|
||||
* Tests the JavaScript functionality of the toolbar.
|
||||
*
|
||||
* @group toolbar
|
||||
*/
|
||||
class ToolbarIntegrationTest extends JavascriptTestBase {
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static $modules = ['toolbar', 'node'];
|
||||
|
||||
/**
|
||||
* Tests if the toolbar can be toggled with JavaScript.
|
||||
*/
|
||||
public function testToolbarToggling() {
|
||||
$admin_user = $this->drupalCreateUser([
|
||||
'access toolbar',
|
||||
'administer site configuration',
|
||||
'access content overview'
|
||||
]);
|
||||
$this->drupalLogin($admin_user);
|
||||
|
||||
$this->drupalGet('<front>');
|
||||
|
||||
// Test that it is possible to toggle the toolbar tray.
|
||||
$this->assertElementVisible('#toolbar-link-system-admin_content', 'Toolbar tray is open by default.');
|
||||
$this->click('#toolbar-item-administration');
|
||||
$this->assertElementNotVisible('#toolbar-link-system-admin_content', 'Toolbar tray is closed after clicking the "Manage" button.');
|
||||
$this->click('#toolbar-item-administration');
|
||||
$this->assertElementVisible('#toolbar-link-system-admin_content', 'Toolbar tray is visible again after clicking the "Manage" button a second time.');
|
||||
|
||||
// Test toggling the toolbar tray between horizontal and vertical.
|
||||
$this->assertElementVisible('#toolbar-item-administration-tray.toolbar-tray-horizontal', 'Toolbar tray is horizontally oriented by default.');
|
||||
$this->assertElementNotPresent('#toolbar-item-administration-tray.toolbar-tray-vertical', 'Toolbar tray is not vertically oriented by default.');
|
||||
|
||||
$this->click('#toolbar-item-administration-tray button.toolbar-icon-toggle-vertical');
|
||||
$this->assertJsCondition('jQuery("#toolbar-item-administration-tray").hasClass("toolbar-tray-vertical")');
|
||||
$this->assertElementVisible('#toolbar-item-administration-tray.toolbar-tray-vertical', 'After toggling the orientation the toolbar tray is now displayed vertically.');
|
||||
|
||||
$this->click('#toolbar-item-administration-tray button.toolbar-icon-toggle-horizontal');
|
||||
$this->assertJsCondition('jQuery("#toolbar-item-administration-tray").hasClass("toolbar-tray-horizontal")');
|
||||
$this->assertElementVisible('#toolbar-item-administration-tray.toolbar-tray-horizontal', 'After toggling the orientation a second time the toolbar tray is displayed horizontally again.');
|
||||
}
|
||||
|
||||
}
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\toolbar\Unit\PageCache\AllowToolbarPathTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\toolbar\Unit\PageCache;
|
||||
|
||||
use Drupal\toolbar\PageCache\AllowToolbarPath;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* @file
|
||||
* Hooks provided by the toolbar module.
|
||||
*/
|
||||
|
||||
use Drupal\Core\Url;
|
||||
|
||||
/**
|
||||
|
|
Reference in a new issue