Core and composer updates

This commit is contained in:
Rob Davies 2017-07-03 16:47:07 +01:00
parent a82634bb98
commit 62cac30480
1118 changed files with 21770 additions and 6306 deletions

View file

@ -5,8 +5,17 @@
* Field UI test module.
*/
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Render\Element;
use Drupal\Core\Field\FieldConfigInterface;
/**
* Implements hook_ENTITY_TYPE_access().
*/
function field_ui_test_field_config_access(FieldConfigInterface $field) {
return AccessResult::forbiddenIf($field->getName() == 'highlander');
}
/**
* Implements hook_form_FORM_BASE_ID_alter().

View file

@ -0,0 +1,61 @@
<?php
namespace Drupal\Tests\field_ui\Functional;
use Drupal\Tests\BrowserTestBase;
/**
* Tests the Manage Display page of a fieldable entity type.
*
* @group field_ui
*/
class ManageFieldsTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
public static $modules = [
'field_ui',
'field_ui_test',
'node',
'text',
];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$account = $this->drupalCreateUser(['administer node fields']);
$this->drupalLogin($account);
$this->config('system.logging')
->set('error_level', ERROR_REPORTING_DISPLAY_ALL)
->save();
}
public function testFieldDropButtonOperations() {
$node_type = $this->drupalCreateContentType();
/** @var \Drupal\field\FieldStorageConfigInterface $storage */
$storage = $this->container->get('entity_type.manager')
->getStorage('field_storage_config')
->create([
'type' => 'string',
'field_name' => 'highlander',
'entity_type' => 'node',
]);
$storage->save();
$this->container->get('entity_type.manager')
->getStorage('field_config')
->create([
'field_storage' => $storage,
'bundle' => $node_type->id(),
])
->save();
$this->drupalGet('/admin/structure/types/manage/' . $node_type->id() . '/fields');
}
}