updated core to 8.6.1 via composer

This commit is contained in:
2018-09-12 13:58:26 +02:00
parent a9a219f2ed
commit ea56b9fba3
4443 changed files with 112098 additions and 40708 deletions
@@ -5,5 +5,5 @@ core: 8.x
package: Testing
version: VERSION
dependencies:
- node
- options
- drupal:node
- drupal:options
@@ -5,5 +5,5 @@ package: Testing
version: VERSION
core: 8.x
dependencies:
- options
- views
- drupal:options
- drupal:views
@@ -3,9 +3,9 @@
namespace Drupal\Tests\options\Functional;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Tests\FieldTestBase;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\entity_test\Entity\EntityTestRev;
use Drupal\Tests\field\Functional\FieldTestBase;
/**
* Base class for testing allowed values of options fields.
@@ -8,6 +8,7 @@ namespace Drupal\Tests\options\Functional;
* @group options
*/
class OptionsDynamicValuesValidationTest extends OptionsDynamicValuesTestBase {
/**
* Test that allowed values function gets the entity.
*/
@@ -4,7 +4,7 @@ namespace Drupal\Tests\options\Functional;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\field\Tests\FieldTestBase;
use Drupal\Tests\field\Functional\FieldTestBase;
/**
* Tests the Options field UI functionality.
@@ -4,7 +4,7 @@ namespace Drupal\Tests\options\Functional;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\field\Tests\FieldTestBase;
use Drupal\Tests\field\Functional\FieldTestBase;
/**
* Tests option fields can be updated and created through config synchronization.
@@ -8,6 +8,7 @@ namespace Drupal\Tests\options\Functional;
* @group options
*/
class OptionsSelectDynamicValuesTest extends OptionsDynamicValuesTestBase {
/**
* Tests the 'options_select' widget (single select).
*/
@@ -24,7 +25,7 @@ class OptionsSelectDynamicValuesTest extends OptionsDynamicValuesTestBase {
$options = $this->xpath('//select[@id="edit-test-options"]/option');
$this->assertEqual(count($options), count($this->test) + 1);
foreach ($options as $option) {
$value = (string) $option['value'];
$value = $option->getValue();
if ($value != '_none') {
$this->assertTrue(array_search($value, $this->test));
}
@@ -4,8 +4,8 @@ namespace Drupal\Tests\options\Functional;
use Drupal\entity_test\Entity\EntityTest;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Tests\FieldTestBase;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\Tests\field\Functional\FieldTestBase;
/**
* Tests the Options widgets.
@@ -35,7 +35,6 @@ class OptionsWidgetsTest extends FieldTestBase {
*/
protected $card2;
protected function setUp() {
parent::setUp();
@@ -255,13 +254,13 @@ class OptionsWidgetsTest extends FieldTestBase {
// Display form.
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
// A required field without any value has a "none" option.
$this->assertTrue($this->xpath('//select[@id=:id]//option[@value="_none" and text()=:label]', [':id' => 'edit-card-1', ':label' => t('- Select a value -')]), 'A required select list has a "Select a value" choice.');
$this->assertTrue($this->xpath('//select[@id=:id]//option[@value="_none" and text()=:label]', [':id' => 'edit-card-1', ':label' => '- Select a value -']), 'A required select list has a "Select a value" choice.');
// With no field data, nothing is selected.
$this->assertNoOptionSelected('edit-card-1', '_none');
$this->assertNoOptionSelected('edit-card-1', 0);
$this->assertNoOptionSelected('edit-card-1', 1);
$this->assertNoOptionSelected('edit-card-1', 2);
$this->assertTrue($this->assertSession()->optionExists('card_1', '_none')->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_1', 0)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_1', 1)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_1', 2)->isSelected());
$this->assertRaw('Some dangerous & unescaped markup', 'Option text was properly filtered.');
// Submit form: select invalid 'none' option.
@@ -278,9 +277,9 @@ class OptionsWidgetsTest extends FieldTestBase {
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
// A required field with a value has no 'none' option.
$this->assertFalse($this->xpath('//select[@id=:id]//option[@value="_none"]', [':id' => 'edit-card-1']), 'A required select list with an actual value has no "none" choice.');
$this->assertOptionSelected('edit-card-1', 0);
$this->assertNoOptionSelected('edit-card-1', 1);
$this->assertNoOptionSelected('edit-card-1', 2);
$this->assertTrue($this->assertSession()->optionExists('card_1', 0)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_1', 1)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_1', 2)->isSelected());
// Make the field non required.
$field->setRequired(FALSE);
@@ -289,7 +288,7 @@ class OptionsWidgetsTest extends FieldTestBase {
// Display form.
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
// A non-required field has a 'none' option.
$this->assertTrue($this->xpath('//select[@id=:id]//option[@value="_none" and text()=:label]', [':id' => 'edit-card-1', ':label' => t('- None -')]), 'A non-required select list has a "None" choice.');
$this->assertTrue($this->xpath('//select[@id=:id]//option[@value="_none" and text()=:label]', [':id' => 'edit-card-1', ':label' => '- None -']), 'A non-required select list has a "None" choice.');
// Submit form: Unselect the option.
$edit = ['card_1' => '_none'];
$this->drupalPostForm('entity_test/manage/' . $entity->id() . '/edit', $edit, t('Save'));
@@ -303,9 +302,9 @@ class OptionsWidgetsTest extends FieldTestBase {
// Display form: with no field data, nothing is selected
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
$this->assertNoOptionSelected('edit-card-1', 0);
$this->assertNoOptionSelected('edit-card-1', 1);
$this->assertNoOptionSelected('edit-card-1', 2);
$this->assertFalse($this->assertSession()->optionExists('card_1', 0)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_1', 1)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_1', 2)->isSelected());
$this->assertRaw('Some dangerous & unescaped markup', 'Option text was properly filtered.');
$this->assertRaw('More <script>dangerous</script> markup', 'Option group text was properly filtered.');
$this->assertRaw('Group 1', 'Option groups are displayed.');
@@ -317,9 +316,9 @@ class OptionsWidgetsTest extends FieldTestBase {
// Display form: check that the right options are selected.
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
$this->assertOptionSelected('edit-card-1', 0);
$this->assertNoOptionSelected('edit-card-1', 1);
$this->assertNoOptionSelected('edit-card-1', 2);
$this->assertTrue($this->assertSession()->optionExists('card_1', 0)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_1', 1)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_1', 2)->isSelected());
// Submit form: Unselect the option.
$edit = ['card_1' => '_none'];
@@ -353,10 +352,10 @@ class OptionsWidgetsTest extends FieldTestBase {
// Display form: with no field data, nothing is selected.
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
$this->assertOptionSelected("edit-card-2", '_none');
$this->assertNoOptionSelected('edit-card-2', 0);
$this->assertNoOptionSelected('edit-card-2', 1);
$this->assertNoOptionSelected('edit-card-2', 2);
$this->assertTrue($this->assertSession()->optionExists('card_2', '_none')->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_2', 0)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_2', 1)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_2', 2)->isSelected());
$this->assertRaw('Some dangerous & unescaped markup', 'Option text was properly filtered.');
// Submit form: select first and third options.
@@ -366,9 +365,9 @@ class OptionsWidgetsTest extends FieldTestBase {
// Display form: check that the right options are selected.
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
$this->assertOptionSelected('edit-card-2', 0);
$this->assertNoOptionSelected('edit-card-2', 1);
$this->assertOptionSelected('edit-card-2', 2);
$this->assertTrue($this->assertSession()->optionExists('card_2', 0)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_2', 1)->isSelected());
$this->assertTrue($this->assertSession()->optionExists('card_2', 2)->isSelected());
// Submit form: select only first option.
$edit = ['card_2[]' => [0 => 0]];
@@ -377,9 +376,9 @@ class OptionsWidgetsTest extends FieldTestBase {
// Display form: check that the right options are selected.
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
$this->assertOptionSelected('edit-card-2', 0);
$this->assertNoOptionSelected('edit-card-2', 1);
$this->assertNoOptionSelected('edit-card-2', 2);
$this->assertTrue($this->assertSession()->optionExists('card_2', 0)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_2', 1)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_2', 2)->isSelected());
// Submit form: select the three options while the field accepts only 2.
$edit = ['card_2[]' => [0 => 0, 1 => 1, 2 => 2]];
@@ -424,9 +423,9 @@ class OptionsWidgetsTest extends FieldTestBase {
// Display form: with no field data, nothing is selected.
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
$this->assertNoOptionSelected('edit-card-2', 0);
$this->assertNoOptionSelected('edit-card-2', 1);
$this->assertNoOptionSelected('edit-card-2', 2);
$this->assertFalse($this->assertSession()->optionExists('card_2', 0)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_2', 1)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_2', 2)->isSelected());
$this->assertRaw('Some dangerous & unescaped markup', 'Option text was properly filtered.');
$this->assertRaw('More <script>dangerous</script> markup', 'Option group text was properly filtered.');
$this->assertRaw('Group 1', 'Option groups are displayed.');
@@ -438,9 +437,9 @@ class OptionsWidgetsTest extends FieldTestBase {
// Display form: check that the right options are selected.
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
$this->assertOptionSelected('edit-card-2', 0);
$this->assertNoOptionSelected('edit-card-2', 1);
$this->assertNoOptionSelected('edit-card-2', 2);
$this->assertTrue($this->assertSession()->optionExists('card_2', 0)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_2', 1)->isSelected());
$this->assertFalse($this->assertSession()->optionExists('card_2', 2)->isSelected());
// Submit form: Unselect the option.
$edit = ['card_2[]' => ['_none' => '_none']];
@@ -488,7 +487,7 @@ class OptionsWidgetsTest extends FieldTestBase {
// Display form: check that _none options are present and has label.
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
// A required field without any value has a "none" option.
$this->assertTrue($this->xpath('//select[@id=:id]//option[@value="_none" and text()=:label]', [':id' => 'edit-card-1', ':label' => t('- None -')]), 'A test select has a "None" choice.');
$this->assertTrue($this->xpath('//select[@id=:id]//option[@value="_none" and text()=:label]', [':id' => 'edit-card-1', ':label' => '- None -']), 'A test select has a "None" choice.');
}
}
@@ -78,20 +78,20 @@ class OptionsListFilterTest extends OptionsTestBase {
'operator' => 'or',
'value' => [
$this->fieldValues[0] => $this->fieldValues[0],
]
],
],
2 => [
'title' => 'Second',
'operator' => 'or',
'value' => [
$this->fieldValues[1] => $this->fieldValues[1],
]
],
],
],
],
'reduce_duplicates' => '',
'plugin_id' => 'list_field',
]
],
];
$view->setDisplay();
$view->displayHandlers->get('default')->overrideOption('filters', $filters);