updated core

This commit is contained in:
Bachir Soussi Chiadmi
2018-01-24 13:36:32 +01:00
parent cd7dea45a9
commit f9374cf96d
1997 changed files with 5175 additions and 127715 deletions
@@ -8,8 +8,8 @@ dependencies:
- views
- entity_test
# Information added by Drupal.org packaging script on 2017-11-03
version: '8.4.2'
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
core: '8.x'
project: 'drupal'
datestamp: 1509719929
datestamp: 1515021228
@@ -45,3 +45,20 @@ function views_entity_test_entity_field_access($operation, FieldDefinitionInterf
// No opinion.
return AccessResult::neutral();
}
/**
* Implements hook_entity_load().
*
* @see \Drupal\Tests\views\Kernel\Handler\FieldFieldTest::testSimpleExecute()
*/
function views_entity_test_entity_load(array $entities, $entity_type_id) {
if ($entity_type_id === 'entity_test') {
// Cast the value of an entity field to be something else than a string so
// we can check that
// \Drupal\views\Tests\ViewResultAssertionTrait::assertIdenticalResultsetHelper()
// takes care of converting all field values to strings.
foreach ($entities as $entity) {
$entity->user_id->target_id = (int) $entity->user_id->target_id;
}
}
}
@@ -7,8 +7,8 @@ package: Testing
dependencies:
- views
# Information added by Drupal.org packaging script on 2017-11-03
version: '8.4.2'
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
core: '8.x'
project: 'drupal'
datestamp: 1509719929
datestamp: 1515021228
@@ -7,8 +7,8 @@ package: Testing
dependencies:
- views
# Information added by Drupal.org packaging script on 2017-11-03
version: '8.4.2'
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
core: '8.x'
project: 'drupal'
datestamp: 1509719929
datestamp: 1515021228
@@ -7,8 +7,8 @@ package: Testing
dependencies:
- views
# Information added by Drupal.org packaging script on 2017-11-03
version: '8.4.2'
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
core: '8.x'
project: 'drupal'
datestamp: 1509719929
datestamp: 1515021228
@@ -8,8 +8,8 @@ dependencies:
- views
- language
# Information added by Drupal.org packaging script on 2017-11-03
version: '8.4.2'
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
core: '8.x'
project: 'drupal'
datestamp: 1509719929
datestamp: 1515021228
@@ -25,7 +25,7 @@ class AccessTest extends ViewTestBase {
/**
* Modules to enable.
*
* @return array
* @var array
*/
public static $modules = ['node'];
@@ -173,7 +173,6 @@ class StyleTest extends ViewTestBase {
$expected['Job: Drummer']['rows']['Age: 28']['rows'][2]->views_test_data_age = '28';
$expected['Job: Drummer']['rows']['Age: 28']['rows'][2]->views_test_data_id = '3';
// Alter the results to support the stripped case.
if ($stripped) {
@@ -194,7 +193,6 @@ class StyleTest extends ViewTestBase {
$view->style_plugin->options['grouping'][1] = ['field' => 'age', 'rendered' => TRUE, 'rendered_strip' => TRUE];
}
// The newer api passes the value of the grouping as well.
$sets_new_rendered = $view->style_plugin->renderGrouping($view->result, $view->style_plugin->options['grouping'], TRUE);
@@ -24,7 +24,7 @@ class FieldFieldTest extends ViewsKernelTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['field', 'entity_test', 'user', 'views_test_formatter'];
public static $modules = ['field', 'entity_test', 'user', 'views_test_formatter', 'views_entity_test'];
/**
* {@inheritdoc}
@@ -234,13 +234,13 @@ class FieldFieldTest extends ViewsKernelTestBase {
$this->assertIdenticalResultset($executable,
[
['id' => 1, 'field_test' => 3],
['id' => 2, 'field_test' => 0],
['id' => 3, 'field_test' => 8],
['id' => 4, 'field_test' => 5],
['id' => 5, 'field_test' => 6],
['id' => 1, 'field_test' => 3, 'user_id' => 2],
['id' => 2, 'field_test' => 0, 'user_id' => 3],
['id' => 3, 'field_test' => 8, 'user_id' => 4],
['id' => 4, 'field_test' => 5, 'user_id' => 5],
['id' => 5, 'field_test' => 6, 'user_id' => 6],
],
['id' => 'id', 'field_test' => 'field_test']
['id' => 'id', 'field_test' => 'field_test', 'user_id' => 'user_id']
);
}
@@ -69,11 +69,20 @@ class StyleGridTest extends PluginKernelTestBase {
}
$width = '0';
switch ($columns) {
case 5: $width = '20'; break;
case 4: $width = '25'; break;
case 3: $width = '33.3333'; break;
case 2: $width = '50'; break;
case 1: $width = '100'; break;
case 5: $width = '20';
break;
case 4: $width = '25';
break;
case 3: $width = '33.3333';
break;
case 2: $width = '50';
break;
case 1: $width = '100';
break;
}
// Ensure last column exists.
$result = $this->xpath('//div[contains(@class, "views-col") and contains(@class, :columns) and starts-with(@style, :width)]', [':columns' => 'col-' . $columns, ':width' => 'width: ' . $width]);
@@ -98,7 +98,6 @@ class RenderCacheIntegrationTest extends ViewsKernelTestBase {
$this->assertViewsCacheTags($view, $base_tags, $do_assert_views_caches, $base_tags);
$this->assertViewsCacheTagsFromStaticRenderArray($view, $base_tags, $do_assert_views_caches);
// Non-empty result (1 entity).
/** @var \Drupal\Core\Entity\EntityInterface[] $entities */
$entities[] = $entity = EntityTest::create();
@@ -109,7 +108,6 @@ class RenderCacheIntegrationTest extends ViewsKernelTestBase {
$this->assertViewsCacheTags($view, $tags_with_entity, $do_assert_views_caches, $tags_with_entity);
$this->assertViewsCacheTagsFromStaticRenderArray($view, $tags_with_entity, $do_assert_views_caches);
// Paged result (more entities than the items-per-page limit).
for ($i = 0; $i < 5; $i++) {
$entities[] = $entity = EntityTest::create();
@@ -259,7 +257,6 @@ class RenderCacheIntegrationTest extends ViewsKernelTestBase {
$this->assertViewsCacheTags($view, $result_tags_with_entity, $do_assert_views_caches, $render_tags_with_entity);
$this->assertViewsCacheTagsFromStaticRenderArray($view, $render_tags_with_entity, $do_assert_views_caches);
// Paged result (more entities than the items-per-page limit).
for ($i = 0; $i < 5; $i++) {
$entities[] = $entity = EntityTest::create();
@@ -92,7 +92,6 @@ class EntityTest extends UnitTestCase {
->method('getStyle')
->willReturn($this->stylePlugin);
$token = $this->getMockBuilder('Drupal\Core\Utility\Token')
->disableOriginalConstructor()
->getMock();
@@ -58,7 +58,6 @@ class ViewTest extends UnitTestCase {
]);
$this->viewHandler->view->storage = $view_this;
$this->viewHandler->options['view_to_insert'] = 'other:default';
$this->assertArrayEquals(['config' => ['view.other']], $this->viewHandler->calculateDependencies());
@@ -71,7 +71,6 @@ class EntityTest extends UnitTestCase {
['test_op_3', NULL, FALSE, TRUE],
]));
$storage = $this->getMock('Drupal\Core\Entity\EntityStorageInterface');
// Setup values for IDs passed as strings or numbers.
@@ -46,7 +46,7 @@ class CounterTest extends UnitTestCase {
/**
* The handler definition of the counter field.
*
* @return array
* @var array
*/
protected $definition;
@@ -236,7 +236,6 @@ class ViewsDataTest extends UnitTestCase {
->method('alter')
->with('views_data', $expected_views_data);
// The cache should only be called once (before the clear() call) as get
// will get all table data in the first get().
$this->cacheBackend->expects($this->at(0))
@@ -4,8 +4,8 @@ description: Theme for testing Views rendering of checkboxes.
# version: VERSION
# core: 8.x
# Information added by Drupal.org packaging script on 2017-11-03
version: '8.4.2'
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
core: '8.x'
project: 'drupal'
datestamp: 1509719929
datestamp: 1515021228
@@ -4,8 +4,8 @@ description: Theme for testing Views functionality.
# version: VERSION
# core: 8.x
# Information added by Drupal.org packaging script on 2017-11-03
version: '8.4.2'
# Information added by Drupal.org packaging script on 2018-01-03
version: '8.4.4'
core: '8.x'
project: 'drupal'
datestamp: 1509719929
datestamp: 1515021228