Update to drupal-org-drupal 8.0.0-rc2. For more information, see https://www.drupal.org/node/2598668

This commit is contained in:
Pantheon Automation 2015-10-21 21:44:50 -07:00 committed by Greg Anderson
parent f32e58e4b1
commit 8e18df8c36
3062 changed files with 15044 additions and 172506 deletions

View file

@ -14,7 +14,6 @@ use Drupal\views\FieldAPIHandlerTrait;
use Drupal\views\ViewExecutable;
use Drupal\views\Plugin\views\display\DisplayPluginBase;
use Drupal\views\Plugin\views\argument\StringArgument;
use Drupal\Component\Utility\SafeMarkup;
/**
* Argument handler for list field to show the human readable name in summary.

View file

@ -25,7 +25,7 @@ class OptionsSelectDynamicValuesTest extends OptionsDynamicValuesTestBase {
$this->drupalLogin($web_user);
// Display form.
$this->drupalGet('entity_test_rev/manage/' . $this->entity->id());
$this->drupalGet('entity_test_rev/manage/' . $this->entity->id() . '/edit');
$options = $this->xpath('//select[@id="edit-test-options"]/option');
$this->assertEqual(count($options), count($this->test) + 1);
foreach ($options as $option) {

View file

@ -108,7 +108,7 @@ class OptionsWidgetsTest extends FieldTestBase {
$entity_init = clone $entity;
// With no field data, no buttons are checked.
$this->drupalGet('entity_test/manage/' . $entity->id());
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
$this->assertNoFieldChecked('edit-card-1-0');
$this->assertNoFieldChecked('edit-card-1-1');
$this->assertNoFieldChecked('edit-card-1-2');
@ -121,7 +121,7 @@ class OptionsWidgetsTest extends FieldTestBase {
$this->assertFieldValues($entity_init, 'card_1', array(0));
// Check that the selected button is checked.
$this->drupalGet('entity_test/manage/' . $entity->id());
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
$this->assertFieldChecked('edit-card-1-0');
$this->assertNoFieldChecked('edit-card-1-1');
$this->assertNoFieldChecked('edit-card-1-2');
@ -136,7 +136,7 @@ class OptionsWidgetsTest extends FieldTestBase {
$this->card1->save();
$field->setRequired(TRUE);
$field->save();
$this->drupalGet('entity_test/manage/' . $entity->id());
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
$this->assertFieldChecked('edit-card-1-99');
}
@ -165,7 +165,7 @@ class OptionsWidgetsTest extends FieldTestBase {
$entity_init = clone $entity;
// Display form: with no field data, nothing is checked.
$this->drupalGet('entity_test/manage/' . $entity->id());
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
$this->assertNoFieldChecked('edit-card-2-0');
$this->assertNoFieldChecked('edit-card-2-1');
$this->assertNoFieldChecked('edit-card-2-2');
@ -181,7 +181,7 @@ class OptionsWidgetsTest extends FieldTestBase {
$this->assertFieldValues($entity_init, 'card_2', array(0, 2));
// Display form: check that the right options are selected.
$this->drupalGet('entity_test/manage/' . $entity->id());
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
$this->assertFieldChecked('edit-card-2-0');
$this->assertNoFieldChecked('edit-card-2-1');
$this->assertFieldChecked('edit-card-2-2');
@ -196,7 +196,7 @@ class OptionsWidgetsTest extends FieldTestBase {
$this->assertFieldValues($entity_init, 'card_2', array(0));
// Display form: check that the right options are selected.
$this->drupalGet('entity_test/manage/' . $entity->id());
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
$this->assertFieldChecked('edit-card-2-0');
$this->assertNoFieldChecked('edit-card-2-1');
$this->assertNoFieldChecked('edit-card-2-2');
@ -225,7 +225,7 @@ class OptionsWidgetsTest extends FieldTestBase {
$this->card2->save();
$field->setRequired(TRUE);
$field->save();
$this->drupalGet('entity_test/manage/' . $entity->id());
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
$this->assertFieldChecked('edit-card-2-99');
}
@ -255,7 +255,7 @@ class OptionsWidgetsTest extends FieldTestBase {
$entity_init = clone $entity;
// Display form.
$this->drupalGet('entity_test/manage/' . $entity->id());
$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]', array(':id' => 'edit-card-1', ':label' => t('- Select a value -'))), 'A required select list has a "Select a value" choice.');
@ -277,7 +277,7 @@ class OptionsWidgetsTest extends FieldTestBase {
$this->assertFieldValues($entity_init, 'card_1', array(0));
// Display form: check that the right options are selected.
$this->drupalGet('entity_test/manage/' . $entity->id());
$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"]', array(':id' => 'edit-card-1')), 'A required select list with an actual value has no "none" choice.');
$this->assertOptionSelected('edit-card-1', 0);
@ -289,12 +289,12 @@ class OptionsWidgetsTest extends FieldTestBase {
$field->save();
// Display form.
$this->drupalGet('entity_test/manage/' . $entity->id());
$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]', array(':id' => 'edit-card-1', ':label' => t('- None -'))), 'A non-required select list has a "None" choice.');
// Submit form: Unselect the option.
$edit = array('card_1' => '_none');
$this->drupalPostForm('entity_test/manage/' . $entity->id(), $edit, t('Save'));
$this->drupalPostForm('entity_test/manage/' . $entity->id() . '/edit', $edit, t('Save'));
$this->assertFieldValues($entity_init, 'card_1', array());
// Test optgroups.
@ -304,7 +304,7 @@ class OptionsWidgetsTest extends FieldTestBase {
$this->card1->save();
// Display form: with no field data, nothing is selected
$this->drupalGet('entity_test/manage/' . $entity->id());
$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);
@ -318,14 +318,14 @@ class OptionsWidgetsTest extends FieldTestBase {
$this->assertFieldValues($entity_init, 'card_1', array(0));
// Display form: check that the right options are selected.
$this->drupalGet('entity_test/manage/' . $entity->id());
$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);
// Submit form: Unselect the option.
$edit = array('card_1' => '_none');
$this->drupalPostForm('entity_test/manage/' . $entity->id(), $edit, t('Save'));
$this->drupalPostForm('entity_test/manage/' . $entity->id() . '/edit', $edit, t('Save'));
$this->assertFieldValues($entity_init, 'card_1', array());
}
@ -354,7 +354,7 @@ class OptionsWidgetsTest extends FieldTestBase {
$entity_init = clone $entity;
// Display form: with no field data, nothing is selected.
$this->drupalGet('entity_test/manage/' . $entity->id());
$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);
@ -367,7 +367,7 @@ class OptionsWidgetsTest extends FieldTestBase {
$this->assertFieldValues($entity_init, 'card_2', array(0, 2));
// Display form: check that the right options are selected.
$this->drupalGet('entity_test/manage/' . $entity->id());
$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);
@ -378,7 +378,7 @@ class OptionsWidgetsTest extends FieldTestBase {
$this->assertFieldValues($entity_init, 'card_2', array(0));
// Display form: check that the right options are selected.
$this->drupalGet('entity_test/manage/' . $entity->id());
$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);
@ -398,18 +398,18 @@ class OptionsWidgetsTest extends FieldTestBase {
// Check that the 'none' option has no effect if actual options are selected
// as well.
$edit = array('card_2[]' => array('_none' => '_none', 0 => 0));
$this->drupalPostForm('entity_test/manage/' . $entity->id(), $edit, t('Save'));
$this->drupalPostForm('entity_test/manage/' . $entity->id() . '/edit', $edit, t('Save'));
$this->assertFieldValues($entity_init, 'card_2', array(0));
// Check that selecting the 'none' option empties the field.
$edit = array('card_2[]' => array('_none' => '_none'));
$this->drupalPostForm('entity_test/manage/' . $entity->id(), $edit, t('Save'));
$this->drupalPostForm('entity_test/manage/' . $entity->id() . '/edit', $edit, t('Save'));
$this->assertFieldValues($entity_init, 'card_2', array());
// A required select list does not have an empty key.
$field->setRequired(TRUE);
$field->save();
$this->drupalGet('entity_test/manage/' . $entity->id());
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
$this->assertFalse($this->xpath('//select[@id=:id]//option[@value=""]', array(':id' => 'edit-card-2')), 'A required select list does not have an empty key.');
// We do not have to test that a required select list with one option is
@ -425,7 +425,7 @@ class OptionsWidgetsTest extends FieldTestBase {
$field->save();
// Display form: with no field data, nothing is selected.
$this->drupalGet('entity_test/manage/' . $entity->id());
$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);
@ -439,14 +439,14 @@ class OptionsWidgetsTest extends FieldTestBase {
$this->assertFieldValues($entity_init, 'card_2', array(0));
// Display form: check that the right options are selected.
$this->drupalGet('entity_test/manage/' . $entity->id());
$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);
// Submit form: Unselect the option.
$edit = array('card_2[]' => array('_none' => '_none'));
$this->drupalPostForm('entity_test/manage/' . $entity->id(), $edit, t('Save'));
$this->drupalPostForm('entity_test/manage/' . $entity->id() . '/edit', $edit, t('Save'));
$this->assertFieldValues($entity_init, 'card_2', array());
}
@ -476,7 +476,7 @@ class OptionsWidgetsTest extends FieldTestBase {
$entity->save();
// Display form: check that _none options are present and has label.
$this->drupalGet('entity_test/manage/' . $entity->id());
$this->drupalGet('entity_test/manage/' . $entity->id() . '/edit');
$this->assertTrue($this->xpath('//div[@id=:id]//input[@value=:value]', array(':id' => 'edit-card-1', ':value' => '_none')), 'A test radio button has a "None" choice.');
$this->assertTrue($this->xpath('//div[@id=:id]//label[@for=:for and text()=:label]', array(':id' => 'edit-card-1', ':for' => 'edit-card-1-none', ':label' => 'N/A')), 'A test radio button has a "N/A" choice.');
@ -488,7 +488,7 @@ class OptionsWidgetsTest extends FieldTestBase {
->save();
// Display form: check that _none options are present and has label.
$this->drupalGet('entity_test/manage/' . $entity->id());
$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]', array(':id' => 'edit-card-1', ':label' => t('- None -'))), 'A test select has a "None" choice.');
}

View file

@ -11,7 +11,6 @@ use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\node\Entity\Node;
use Drupal\node\Entity\NodeType;
use Drupal\views\Tests\ViewTestBase;
use Drupal\views\Tests\ViewTestData;
use Drupal\views\Tests\ViewKernelTestBase;