Update to Drupal 8.1.0. For more information, see https://www.drupal.org/drupal-8.1.0-release-notes
This commit is contained in:
parent
b11a755ba8
commit
c0a0d5a94c
6920 changed files with 64395 additions and 57312 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
use Drupal\Core\Routing\RouteMatchInterface;
|
||||
use Drupal\Core\Template\Attribute;
|
||||
use Drupal\rdf\Entity\RdfMapping;
|
||||
|
||||
/**
|
||||
* Implements hook_help().
|
||||
|
@ -73,7 +74,7 @@ function rdf_get_mapping($entity_type, $bundle) {
|
|||
|
||||
// If not found, create a fresh mapping object.
|
||||
if (!$mapping) {
|
||||
$mapping = entity_create('rdf_mapping', array(
|
||||
$mapping = RdfMapping::create(array(
|
||||
'targetEntityType' => $entity_type,
|
||||
'bundle' => $bundle,
|
||||
));
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\CommonDataConverter.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf;
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Entity\RdfMapping.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Entity;
|
||||
|
||||
use Drupal\Core\Config\Entity\ConfigEntityBase;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\RdfMappingInterface.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf;
|
||||
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\SchemaOrgDataConverter.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf;
|
||||
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\CommentAttributesTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests;
|
||||
|
||||
use Drupal\comment\CommentInterface;
|
||||
use Drupal\comment\CommentManagerInterface;
|
||||
use Drupal\comment\Tests\CommentTestBase;
|
||||
use Drupal\user\RoleInterface;
|
||||
use Drupal\comment\Entity\Comment;
|
||||
|
||||
/**
|
||||
* Tests the RDFa markup of comments.
|
||||
|
@ -372,7 +368,7 @@ class CommentAttributesTest extends CommentTestBase {
|
|||
$values += $contact;
|
||||
}
|
||||
|
||||
$comment = entity_create('comment', $values);
|
||||
$comment = Comment::create($values);
|
||||
$comment->save();
|
||||
return $comment;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\CrudTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests;
|
||||
|
||||
use Drupal\simpletest\KernelTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\EntityReferenceFieldAttributesTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests;
|
||||
|
||||
use Drupal\Core\Field\FieldStorageDefinitionInterface;
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\Field\TestDataConverter.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests\Field;
|
||||
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\FileFieldAttributesTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests;
|
||||
|
||||
use Drupal\file\Tests\FileFieldTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\GetNamespacesTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\GetRdfNamespacesTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\ImageFieldAttributesTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests;
|
||||
|
||||
use Drupal\image\Entity\ImageStyle;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\NodeAttributesTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests;
|
||||
|
||||
use Drupal\node\Tests\NodeTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\RdfaAttributesTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests;
|
||||
|
||||
use Drupal\simpletest\KernelTestBase;
|
||||
|
|
|
@ -1,17 +1,15 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\StandardProfileTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests;
|
||||
|
||||
use Drupal\Core\Url;
|
||||
use Drupal\file\Entity\File;
|
||||
use Drupal\image\Entity\ImageStyle;
|
||||
use Drupal\node\Entity\NodeType;
|
||||
use Drupal\node\NodeInterface;
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
use Drupal\comment\Entity\Comment;
|
||||
use Drupal\taxonomy\Entity\Term;
|
||||
|
||||
/**
|
||||
* Tests the RDF mappings and RDFa markup of the standard profile.
|
||||
|
@ -109,7 +107,7 @@ class StandardProfileTest extends WebTestBase {
|
|||
|
||||
// Use Classy theme for testing markup output.
|
||||
\Drupal::service('theme_handler')->install(['classy']);
|
||||
$this->config('system.theme')->set('default', 'classy')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('classy');
|
||||
|
||||
$this->baseUri = \Drupal::url('<front>', [], ['absolute' => TRUE]);
|
||||
|
||||
|
@ -130,16 +128,16 @@ class StandardProfileTest extends WebTestBase {
|
|||
$this->drupalLogin($this->adminUser);
|
||||
|
||||
// Create term.
|
||||
$this->term = entity_create('taxonomy_term', array(
|
||||
$this->term = Term::create([
|
||||
'name' => $this->randomMachineName(),
|
||||
'description' => $this->randomMachineName(),
|
||||
'vid' => 'tags',
|
||||
));
|
||||
]);
|
||||
$this->term->save();
|
||||
|
||||
// Create image.
|
||||
file_unmanaged_copy(\Drupal::root() . '/core/misc/druplicon.png', 'public://example.jpg');
|
||||
$this->image = entity_create('file', array('uri' => 'public://example.jpg'));
|
||||
$this->image = File::create(['uri' => 'public://example.jpg']);
|
||||
$this->image->save();
|
||||
|
||||
// Create article.
|
||||
|
@ -515,7 +513,7 @@ class StandardProfileTest extends WebTestBase {
|
|||
$values += $contact;
|
||||
}
|
||||
|
||||
$comment = entity_create('comment', $values);
|
||||
$comment = Comment::create($values);
|
||||
$comment->save();
|
||||
return $comment;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\TaxonomyAttributesTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests;
|
||||
|
||||
use Drupal\taxonomy\Tests\TaxonomyTestBase;
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\UserAttributesTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests;
|
||||
|
||||
use Drupal\simpletest\WebTestBase;
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\Field\DateTimeFieldRdfaTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests\Field;
|
||||
namespace Drupal\Tests\rdf\Kernel\Field;
|
||||
|
||||
use Drupal\entity_test\Entity\EntityTest;
|
||||
|
||||
/**
|
||||
* Tests RDFa output by datetime field formatters.
|
||||
|
@ -42,7 +40,7 @@ class DateTimeFieldRdfaTest extends FieldRdfaTestBase {
|
|||
))->save();
|
||||
|
||||
// Set up test entity.
|
||||
$this->entity = entity_create('entity_test', array());
|
||||
$this->entity = EntityTest::create(array());
|
||||
$this->entity->{$this->fieldName}->value = $this->testValue;
|
||||
}
|
||||
|
|
@ -1,10 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\Field\EmailFieldRdfaTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests\Field;
|
||||
namespace Drupal\Tests\rdf\Kernel\Field;
|
||||
|
||||
use Drupal\entity_test\Entity\EntityTest;
|
||||
|
||||
/**
|
||||
* Tests RDFa output by email field formatters.
|
||||
|
@ -36,7 +34,7 @@ class EmailFieldRdfaTest extends FieldRdfaTestBase {
|
|||
|
||||
// Set up test values.
|
||||
$this->testValue = 'test@example.com';
|
||||
$this->entity = entity_create('entity_test', array());
|
||||
$this->entity = EntityTest::create(array());
|
||||
$this->entity->{$this->fieldName}->value = $this->testValue;
|
||||
}
|
||||
|
|
@ -1,10 +1,6 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\Field\EntityReferenceRdfaTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests\Field;
|
||||
namespace Drupal\Tests\rdf\Kernel\Field;
|
||||
|
||||
use Drupal\field\Tests\EntityReference\EntityReferenceTestTrait;
|
||||
use Drupal\user\Entity\Role;
|
||||
|
@ -70,11 +66,15 @@ class EntityReferenceRdfaTest extends FieldRdfaTestBase {
|
|||
))->save();
|
||||
|
||||
// Create the entity to be referenced.
|
||||
$this->targetEntity = entity_create($this->entityType, array('name' => $this->randomMachineName()));
|
||||
$this->targetEntity = $this->container->get('entity_type.manager')
|
||||
->getStorage($this->entityType)
|
||||
->create(array('name' => $this->randomMachineName()));
|
||||
$this->targetEntity->save();
|
||||
|
||||
// Create the entity that will have the entity reference field.
|
||||
$this->entity = entity_create($this->entityType, array('name' => $this->randomMachineName()));
|
||||
$this->entity = $this->container->get('entity_type.manager')
|
||||
->getStorage($this->entityType)
|
||||
->create(array('name' => $this->randomMachineName()));
|
||||
$this->entity->save();
|
||||
$this->entity->{$this->fieldName}->entity = $this->targetEntity;
|
||||
$this->uri = $this->getAbsoluteUri($this->entity);
|
|
@ -1,10 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\Field\FieldRdfaDatatypeCallbackTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests\Field;
|
||||
namespace Drupal\Tests\rdf\Kernel\Field;
|
||||
|
||||
use Drupal\entity_test\Entity\EntityTest;
|
||||
|
||||
/**
|
||||
* Tests the RDFa output of a text field formatter with a datatype callback.
|
||||
|
@ -41,7 +39,7 @@ class FieldRdfaDatatypeCallbackTest extends FieldRdfaTestBase {
|
|||
|
||||
// Set up test values.
|
||||
$this->testValue = $this->randomMachineName();
|
||||
$this->entity = entity_create('entity_test');
|
||||
$this->entity = EntityTest::create();
|
||||
$this->entity->{$this->fieldName}->value = $this->testValue;
|
||||
$this->entity->save();
|
||||
|
|
@ -1,14 +1,12 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\Field\FieldRdfaTestBase.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests\Field;
|
||||
namespace Drupal\Tests\rdf\Kernel\Field;
|
||||
|
||||
use Drupal\field\Tests\FieldUnitTestBase;
|
||||
use Drupal\field\Entity\FieldConfig;
|
||||
use Drupal\Tests\field\Kernel\FieldKernelTestBase;
|
||||
use Drupal\field\Entity\FieldStorageConfig;
|
||||
|
||||
abstract class FieldRdfaTestBase extends FieldUnitTestBase {
|
||||
abstract class FieldRdfaTestBase extends FieldKernelTestBase {
|
||||
|
||||
/**
|
||||
* The machine name of the field type to test.
|
||||
|
@ -43,7 +41,7 @@ abstract class FieldRdfaTestBase extends FieldUnitTestBase {
|
|||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $debug = TRUE;
|
||||
protected $debug = FALSE;
|
||||
|
||||
/**
|
||||
* Modules to enable.
|
||||
|
@ -100,8 +98,8 @@ abstract class FieldRdfaTestBase extends FieldUnitTestBase {
|
|||
// If verbose debugging is turned on, display the HTML and parsed RDF
|
||||
// in the results.
|
||||
if ($this->debug) {
|
||||
debug($output);
|
||||
debug($graph->toRdfPhp());
|
||||
print_r($output);
|
||||
print_r($graph->toRdfPhp());
|
||||
}
|
||||
|
||||
$this->assertTrue($graph->hasProperty($this->uri, $property, $expected_rdf_value), "Formatter {$formatter['type']} exposes data correctly for {$this->fieldType} fields.");
|
||||
|
@ -114,17 +112,17 @@ abstract class FieldRdfaTestBase extends FieldUnitTestBase {
|
|||
* (optional) An array of field settings.
|
||||
*/
|
||||
protected function createTestField($field_settings = array()) {
|
||||
entity_create('field_storage_config', array(
|
||||
FieldStorageConfig::create(array(
|
||||
'field_name' => $this->fieldName,
|
||||
'entity_type' => 'entity_test',
|
||||
'type' => $this->fieldType,
|
||||
))->save();
|
||||
entity_create('field_config', array(
|
||||
FieldConfig::create([
|
||||
'entity_type' => 'entity_test',
|
||||
'field_name' => $this->fieldName,
|
||||
'bundle' => 'entity_test',
|
||||
'settings' => $field_settings,
|
||||
))->save();
|
||||
])->save();
|
||||
}
|
||||
|
||||
/**
|
|
@ -1,10 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\Field\LinkFieldRdfaTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests\Field;
|
||||
namespace Drupal\Tests\rdf\Kernel\Field;
|
||||
|
||||
use Drupal\entity_test\Entity\EntityTest;
|
||||
|
||||
/**
|
||||
* Tests the placement of RDFa in link field formatters.
|
||||
|
@ -45,7 +43,7 @@ class LinkFieldRdfaTest extends FieldRdfaTestBase {
|
|||
public function testAllFormattersExternal() {
|
||||
// Set up test values.
|
||||
$this->testValue = 'http://test.me/foo/bar/neque/porro/quisquam/est/qui-dolorem?foo/bar/neque/porro/quisquam/est/qui-dolorem';
|
||||
$this->entity = entity_create('entity_test', array());
|
||||
$this->entity = EntityTest::create(array());
|
||||
$this->entity->{$this->fieldName}->uri = $this->testValue;
|
||||
|
||||
// Set up the expected result.
|
||||
|
@ -63,7 +61,7 @@ class LinkFieldRdfaTest extends FieldRdfaTestBase {
|
|||
public function testAllFormattersInternal() {
|
||||
// Set up test values.
|
||||
$this->testValue = 'admin';
|
||||
$this->entity = entity_create('entity_test', array());
|
||||
$this->entity = EntityTest::create(array());
|
||||
$this->entity->{$this->fieldName}->uri = 'internal:/admin';
|
||||
|
||||
// Set up the expected result.
|
||||
|
@ -82,7 +80,7 @@ class LinkFieldRdfaTest extends FieldRdfaTestBase {
|
|||
public function testAllFormattersFront() {
|
||||
// Set up test values.
|
||||
$this->testValue = '/';
|
||||
$this->entity = entity_create('entity_test', array());
|
||||
$this->entity = EntityTest::create(array());
|
||||
$this->entity->{$this->fieldName}->uri = 'internal:/';
|
||||
|
||||
// Set up the expected result.
|
|
@ -1,10 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\Field\NumberFieldRdfaTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests\Field;
|
||||
namespace Drupal\Tests\rdf\Kernel\Field;
|
||||
|
||||
use Drupal\entity_test\Entity\EntityTest;
|
||||
|
||||
/**
|
||||
* Tests RDFa output by number field formatters.
|
||||
|
@ -33,7 +31,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
|
|||
*/
|
||||
public function testIntegerFormatterWithSettings() {
|
||||
\Drupal::service('theme_handler')->install(['classy']);
|
||||
$this->config('system.theme')->set('default', 'classy')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('classy');
|
||||
$this->fieldType = 'integer';
|
||||
$formatter = array(
|
||||
'type' => 'number_integer',
|
||||
|
@ -76,7 +74,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
|
|||
*/
|
||||
public function testFloatFormatterWithSettings() {
|
||||
\Drupal::service('theme_handler')->install(['classy']);
|
||||
$this->config('system.theme')->set('default', 'classy')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('classy');
|
||||
$this->fieldType = 'float';
|
||||
$formatter = array(
|
||||
'type' => 'number_decimal',
|
||||
|
@ -126,7 +124,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
|
|||
*/
|
||||
public function testFloatFormatterWithScaleExercised() {
|
||||
\Drupal::service('theme_handler')->install(['classy']);
|
||||
$this->config('system.theme')->set('default', 'classy')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('classy');
|
||||
$this->fieldType = 'float';
|
||||
$formatter = array(
|
||||
'type' => 'number_decimal',
|
||||
|
@ -164,7 +162,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
|
|||
*/
|
||||
public function testDecimalFormatterWithSettings() {
|
||||
\Drupal::service('theme_handler')->install(['classy']);
|
||||
$this->config('system.theme')->set('default', 'classy')->save();
|
||||
\Drupal::service('theme_handler')->setDefault('classy');
|
||||
$this->fieldType = 'decimal';
|
||||
$formatter = array(
|
||||
'type' => 'number_decimal',
|
||||
|
@ -199,7 +197,7 @@ class NumberFieldRdfaTest extends FieldRdfaTestBase {
|
|||
))->save();
|
||||
|
||||
// Set up test entity.
|
||||
$this->entity = entity_create('entity_test', array());
|
||||
$this->entity = EntityTest::create(array());
|
||||
$this->entity->{$this->fieldName}->value = $testValue;
|
||||
}
|
||||
}
|
|
@ -1,10 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\Field\StringFieldRdfaTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests\Field;
|
||||
namespace Drupal\Tests\rdf\Kernel\Field;
|
||||
|
||||
use Drupal\entity_test\Entity\EntityTest;
|
||||
|
||||
/**
|
||||
* Tests RDFa output by text field formatters.
|
||||
|
@ -44,7 +42,7 @@ class StringFieldRdfaTest extends FieldRdfaTestBase {
|
|||
))->save();
|
||||
|
||||
// Set up test entity.
|
||||
$this->entity = entity_create('entity_test');
|
||||
$this->entity = EntityTest::create();
|
||||
$this->entity->{$this->fieldName}->value = $this->testValue;
|
||||
$this->entity->{$this->fieldName}->summary = $this->testSummary;
|
||||
}
|
|
@ -1,10 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\Field\TelephoneFieldRdfaTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests\Field;
|
||||
namespace Drupal\Tests\rdf\Kernel\Field;
|
||||
|
||||
use Drupal\entity_test\Entity\EntityTest;
|
||||
|
||||
/**
|
||||
* Tests RDFa output by telephone field formatters.
|
||||
|
@ -43,7 +41,7 @@ class TelephoneFieldRdfaTest extends FieldRdfaTestBase {
|
|||
|
||||
// Set up test values.
|
||||
$this->testValue = '555-555-5555';
|
||||
$this->entity = entity_create('entity_test', array());
|
||||
$this->entity = EntityTest::create(array());
|
||||
$this->entity->{$this->fieldName}->value = $this->testValue;
|
||||
}
|
||||
|
|
@ -1,10 +1,8 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\rdf\Tests\Field\TextFieldRdfaTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\rdf\Tests\Field;
|
||||
namespace Drupal\Tests\rdf\Kernel\Field;
|
||||
|
||||
use Drupal\entity_test\Entity\EntityTest;
|
||||
|
||||
/**
|
||||
* Tests RDFa output by text field formatters.
|
||||
|
@ -51,7 +49,7 @@ class TextFieldRdfaTest extends FieldRdfaTestBase {
|
|||
))->save();
|
||||
|
||||
// Set up test entity.
|
||||
$this->entity = entity_create('entity_test');
|
||||
$this->entity = EntityTest::create();
|
||||
$this->entity->{$this->fieldName}->value = $this->testValue;
|
||||
$this->entity->{$this->fieldName}->summary = $this->testSummary;
|
||||
}
|
|
@ -1,10 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Contains \Drupal\Tests\rdf\Unit\RdfMappingConfigEntityUnitTest.
|
||||
*/
|
||||
|
||||
namespace Drupal\Tests\rdf\Unit;
|
||||
|
||||
use Drupal\Core\DependencyInjection\ContainerBuilder;
|
||||
|
|
Reference in a new issue