Update to drupal 8.0.0-rc1. For more information, see https://www.drupal.org/node/2582663
This commit is contained in:
parent
eb34d130a8
commit
f32e58e4b1
8476 changed files with 211648 additions and 170042 deletions
|
|
@ -22,7 +22,7 @@ class StringFieldTest extends WebTestBase {
|
|||
*
|
||||
* @var array
|
||||
*/
|
||||
public static $modules = array('entity_test');
|
||||
public static $modules = array('entity_test', 'file');
|
||||
|
||||
/**
|
||||
* A user without any special permissions.
|
||||
|
|
@ -81,7 +81,7 @@ class StringFieldTest extends WebTestBase {
|
|||
$this->drupalGet('entity_test/add');
|
||||
$this->assertFieldByName("{$field_name}[0][value]", '', 'Widget is displayed');
|
||||
$this->assertNoFieldByName("{$field_name}[0][format]", '1', 'Format selector is not displayed');
|
||||
$this->assertRaw(format_string('placeholder="A placeholder on !widget_type"', array('!widget_type' => $widget_type)));
|
||||
$this->assertRaw(format_string('placeholder="A placeholder on @widget_type"', array('@widget_type' => $widget_type)));
|
||||
|
||||
// Submit with some value.
|
||||
$value = $this->randomMachineName();
|
||||
|
|
|
|||
|
|
@ -46,13 +46,19 @@ class UuidFormatterTest extends KernelTestBase {
|
|||
|
||||
$uuid_field = $entity->get('uuid');
|
||||
|
||||
// Verify default render.
|
||||
$render_array = $uuid_field->view([]);
|
||||
$this->assertIdentical($render_array[0]['#markup'], $entity->uuid(), 'The rendered UUID matches the entity UUID.');
|
||||
$this->assertIdentical($render_array[0]['#context']['value'], $entity->uuid(), 'The rendered UUID matches the entity UUID.');
|
||||
$this->assertTrue(strpos($this->render($render_array), $entity->uuid()), 'The rendered UUID found.');
|
||||
|
||||
// Verify customized render.
|
||||
$render_array = $uuid_field->view(['settings' => ['link_to_entity' => TRUE]]);
|
||||
$this->assertIdentical($render_array[0]['#type'], 'link');
|
||||
$this->assertIdentical($render_array[0]['#title']['#markup'], $entity->uuid());
|
||||
$this->assertIdentical($render_array[0]['#title']['#context']['value'], $entity->uuid());
|
||||
$this->assertIdentical($render_array[0]['#url']->toString(), $entity->url());
|
||||
$rendered = $this->render($render_array);
|
||||
$this->assertTrue(strpos($rendered, $entity->uuid()), 'The rendered UUID found.');
|
||||
$this->assertTrue(strpos($rendered, $entity->url()), 'The rendered entity URL found.');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue