Update to Drupal 8.0.2. For more information, see https://www.drupal.org/drupal-8.0.2-release-notes
This commit is contained in:
parent
1a0e9d9fac
commit
a6b049dd05
538 changed files with 5247 additions and 1594 deletions
|
@ -0,0 +1,58 @@
|
|||
langcode: en
|
||||
status: true
|
||||
dependencies: { }
|
||||
id: test_area_messages
|
||||
label: ''
|
||||
module: views
|
||||
description: ''
|
||||
tag: ''
|
||||
base_table: views_test_data
|
||||
base_field: nid
|
||||
core: '8'
|
||||
display:
|
||||
default:
|
||||
display_options:
|
||||
defaults:
|
||||
fields: false
|
||||
pager: false
|
||||
sorts: false
|
||||
fields:
|
||||
id:
|
||||
field: id
|
||||
id: id
|
||||
relationship: none
|
||||
table: views_test_data
|
||||
plugin_id: numeric
|
||||
pager:
|
||||
options:
|
||||
offset: 0
|
||||
type: none
|
||||
sorts:
|
||||
id:
|
||||
field: id
|
||||
id: id
|
||||
order: ASC
|
||||
relationship: none
|
||||
table: views_test_data
|
||||
plugin_id: numeric
|
||||
empty:
|
||||
title:
|
||||
field: title
|
||||
id: title
|
||||
table: views
|
||||
plugin_id: title
|
||||
title: test_title_empty
|
||||
header:
|
||||
messages:
|
||||
id: messages
|
||||
table: views
|
||||
field: messages
|
||||
relationship: none
|
||||
group_type: group
|
||||
admin_label: ''
|
||||
empty: true
|
||||
plugin_id: messages
|
||||
display_plugin: default
|
||||
display_title: Master
|
||||
id: default
|
||||
position: 0
|
|
@ -0,0 +1,23 @@
|
|||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
module:
|
||||
- user
|
||||
id: test_preview_error
|
||||
label: test_preview_error
|
||||
module: views
|
||||
description: ''
|
||||
tag: ''
|
||||
base_table: views_test_data
|
||||
base_field: id
|
||||
core: 8.x
|
||||
display:
|
||||
default:
|
||||
display_plugin: default
|
||||
id: default
|
||||
display_title: Master
|
||||
position: null
|
||||
display_options:
|
||||
row:
|
||||
type: fields
|
||||
fields: { }
|
|
@ -108,7 +108,7 @@ display:
|
|||
default_sort_order: asc
|
||||
align: ''
|
||||
separator: ''
|
||||
empty_column: false
|
||||
empty_column: true
|
||||
responsive: ''
|
||||
default: id
|
||||
empty_table: true
|
||||
|
|
|
@ -135,7 +135,7 @@ class ResultTest extends UnitTestCase {
|
|||
$this->view->pager = $pager;
|
||||
$this->view->style_plugin = new \stdClass();
|
||||
$this->view->total_rows = 100;
|
||||
$this->view->result = array(1,2,3,4,5);
|
||||
$this->view->result = array(1, 2, 3, 4, 5);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -260,6 +260,44 @@ class PathPluginBaseTest extends UnitTestCase {
|
|||
$this->assertSame($collection->get('test_route_2'), $route_2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the alter route method with preexisting title callback.
|
||||
*/
|
||||
public function testAlterRouteWithAlterCallback() {
|
||||
$collection = new RouteCollection();
|
||||
$collection->add('test_route', new Route('test_route', array('_controller' => 'Drupal\Tests\Core\Controller\TestController::content', '_title_callback' => '\Drupal\Tests\views\Unit\Plugin\display\TestController::testTitle')));
|
||||
$route_2 = new Route('test_route/example', array('_controller' => 'Drupal\Tests\Core\Controller\TestController::content'));
|
||||
$collection->add('test_route_2', $route_2);
|
||||
|
||||
list($view) = $this->setupViewExecutableAccessPlugin();
|
||||
|
||||
$display = array();
|
||||
$display['display_plugin'] = 'page';
|
||||
$display['id'] = 'page_1';
|
||||
$display['display_options'] = array(
|
||||
'path' => 'test_route',
|
||||
);
|
||||
$this->pathPlugin->initDisplay($view, $display);
|
||||
|
||||
$view_route_names = $this->pathPlugin->alterRoutes($collection);
|
||||
$this->assertEquals(array('test_id.page_1' => 'test_route'), $view_route_names);
|
||||
|
||||
// Ensure that the test_route is overridden.
|
||||
$route = $collection->get('test_route');
|
||||
$this->assertTrue($route instanceof Route);
|
||||
$this->assertEquals('test_id', $route->getDefault('view_id'));
|
||||
$this->assertEquals('\Drupal\Tests\views\Unit\Plugin\display\TestController::testTitle', $route->getDefault('_title_callback'));
|
||||
$this->assertEquals('page_1', $route->getDefault('display_id'));
|
||||
$this->assertEquals('my views title', $route->getDefault('_title'));
|
||||
|
||||
// Ensure that the test_route_2 is not overridden.
|
||||
$route = $collection->get('test_route_2');
|
||||
$this->assertTrue($route instanceof Route);
|
||||
$this->assertFalse($route->hasDefault('view_id'));
|
||||
$this->assertFalse($route->hasDefault('display_id'));
|
||||
$this->assertSame($collection->get('test_route_2'), $route_2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the collectRoutes method with a path containing named parameters.
|
||||
*
|
||||
|
@ -457,3 +495,20 @@ class PathPluginBaseTest extends UnitTestCase {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* A page controller for use by tests in this file.
|
||||
*/
|
||||
class TestController {
|
||||
|
||||
/**
|
||||
* A page title callback.
|
||||
*
|
||||
* @return string
|
||||
* The page title.
|
||||
*/
|
||||
public function testTitle() {
|
||||
return 'Test title';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class EntityOperationsUnitTest extends UnitTestCase {
|
|||
*
|
||||
* @covers ::__construct
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp() {
|
||||
$this->entityManager = $this->getMock('\Drupal\Core\Entity\EntityManagerInterface');
|
||||
$this->languageManager = $this->getMock('\Drupal\Core\Language\LanguageManagerInterface');
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class ViewsHandlerManagerTest extends UnitTestCase {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setUp() {
|
||||
protected function setUp() {
|
||||
$this->viewsData = $this->getMockBuilder('Drupal\views\ViewsData')
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
|
|
Reference in a new issue