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
|
|
@ -13,6 +13,7 @@ use Drupal\Core\Form\FormStateInterface;
|
|||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
use Drupal\field\Entity\FieldConfig;
|
||||
use Drupal\field_ui\FieldUI;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* Provides a form for the "field storage" edit page.
|
||||
|
|
@ -33,6 +34,9 @@ class FieldStorageConfigEditForm extends EntityForm {
|
|||
// The URL of this entity form contains only the ID of the field_config
|
||||
// but we are actually editing a field_storage_config entity.
|
||||
$field_config = FieldConfig::load($route_match->getRawParameter('field_config'));
|
||||
if (!$field_config) {
|
||||
throw new NotFoundHttpException();
|
||||
}
|
||||
|
||||
return $field_config->getFieldStorageDefinition();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ class EntityDisplayTest extends KernelTestBase {
|
|||
$display->save();
|
||||
$components = array_keys($display->getComponents());
|
||||
// The name field is not configurable so will be added automatically.
|
||||
$expected = array ( 0 => 'component_1', 1 => 'component_2', 2 => 'component_3', 'name');
|
||||
$expected = array ( 0 => 'component_1', 1 => 'component_2', 2 => 'component_3', 'name');
|
||||
$this->assertIdentical($components, $expected);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ trait FieldUiTestTrait {
|
|||
}
|
||||
|
||||
// First step: 'Add field' page.
|
||||
$this->drupalPostForm($bundle_path, $initial_edit, t('Save and continue'));
|
||||
$this->drupalPostForm($bundle_path, $initial_edit, t('Save and continue'));
|
||||
$this->assertRaw(t('These settings apply to the %label field everywhere it is used.', array('%label' => $label)), 'Storage settings page was displayed.');
|
||||
// Test Breadcrumbs.
|
||||
$this->assertLink($label, 0, 'Field label is correct in the breadcrumb of the storage settings page.');
|
||||
|
|
|
|||
|
|
@ -492,13 +492,13 @@ class ManageFieldsTest extends WebTestBase {
|
|||
// Try with an entity key.
|
||||
$edit['field_name'] = 'title';
|
||||
$bundle_path = 'admin/structure/types/manage/' . $this->contentType;
|
||||
$this->drupalPostForm("$bundle_path/fields/add-field", $edit, t('Save and continue'));
|
||||
$this->drupalPostForm("$bundle_path/fields/add-field", $edit, t('Save and continue'));
|
||||
$this->assertText(t('The machine-readable name is already in use. It must be unique.'));
|
||||
|
||||
// Try with a base field.
|
||||
$edit['field_name'] = 'sticky';
|
||||
$bundle_path = 'admin/structure/types/manage/' . $this->contentType;
|
||||
$this->drupalPostForm("$bundle_path/fields/add-field", $edit, t('Save and continue'));
|
||||
$this->drupalPostForm("$bundle_path/fields/add-field", $edit, t('Save and continue'));
|
||||
$this->assertText(t('The machine-readable name is already in use. It must be unique.'));
|
||||
}
|
||||
|
||||
|
|
@ -718,4 +718,17 @@ class ManageFieldsTest extends WebTestBase {
|
|||
$this->assertEqual($view_display->getComponent('field_test_custom_options')['type'], 'field_test_multiple');
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the access to non-existent field URLs.
|
||||
*/
|
||||
public function testNonExistentFieldUrls() {
|
||||
$field_id = 'node.foo.bar';
|
||||
|
||||
$this->drupalGet('admin/structure/types/manage/' . $this->contentType . '/fields/' . $field_id);
|
||||
$this->assertResponse(404);
|
||||
|
||||
$this->drupalGet('admin/structure/types/manage/' . $this->contentType . '/fields/' . $field_id . '/storage');
|
||||
$this->assertResponse(404);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue