summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2016-02-04 10:51:39 (GMT)
committerAlex Pott2016-02-04 10:51:39 (GMT)
commit2ecea88243173a35e3d542de7554b2ad8af50fc9 (patch)
tree8ac1ffc5c3a85b526fc0ddb877f9e53f55378e96
parente495c4904974dde67a93ad395b8ef252e08bed8d (diff)
Issue #2641540 by Mac_Weber: Replace deprecated usage of entity_create('entity_test_mulrev') with a direct call to EntityTestMulRev::create()
-rw-r--r--core/modules/serialization/src/Tests/EntityResolverTest.php3
-rw-r--r--core/modules/serialization/src/Tests/EntitySerializationTest.php3
-rw-r--r--core/modules/system/src/Tests/Entity/EntityQueryTest.php2
3 files changed, 5 insertions, 3 deletions
diff --git a/core/modules/serialization/src/Tests/EntityResolverTest.php b/core/modules/serialization/src/Tests/EntityResolverTest.php
index f63d96d..e362b8d 100644
--- a/core/modules/serialization/src/Tests/EntityResolverTest.php
+++ b/core/modules/serialization/src/Tests/EntityResolverTest.php
@@ -7,6 +7,7 @@
namespace Drupal\serialization\Tests;
use Drupal\Core\Url;
+use Drupal\entity_test\Entity\EntityTestMulRev;
/**
* Tests that entities references can be resolved.
@@ -57,7 +58,7 @@ class EntityResolverTest extends NormalizerTestBase {
*/
function testUuidEntityResolver() {
// Create an entity to get the UUID from.
- $entity = entity_create('entity_test_mulrev', array('type' => 'entity_test_mulrev'));
+ $entity = EntityTestMulRev::create(array('type' => 'entity_test_mulrev'));
$entity->set('name', 'foobar');
$entity->set('field_test_entity_reference', array(array('target_id' => 1)));
$entity->save();
diff --git a/core/modules/serialization/src/Tests/EntitySerializationTest.php b/core/modules/serialization/src/Tests/EntitySerializationTest.php
index 1dbc51c..d9be353 100644
--- a/core/modules/serialization/src/Tests/EntitySerializationTest.php
+++ b/core/modules/serialization/src/Tests/EntitySerializationTest.php
@@ -8,6 +8,7 @@
namespace Drupal\serialization\Tests;
use Drupal\Component\Utility\SafeMarkup;
+use Drupal\entity_test\Entity\EntityTestMulRev;
/**
* Tests that entities can be serialized to supported core formats.
@@ -81,7 +82,7 @@ class EntitySerializationTest extends NormalizerTestBase {
'format' => 'full_html',
),
);
- $this->entity = entity_create('entity_test_mulrev', $this->values);
+ $this->entity = EntityTestMulRev::create($this->values);
$this->entity->save();
$this->serializer = $this->container->get('serializer');
diff --git a/core/modules/system/src/Tests/Entity/EntityQueryTest.php b/core/modules/system/src/Tests/Entity/EntityQueryTest.php
index 3124f54..932e5fb 100644
--- a/core/modules/system/src/Tests/Entity/EntityQueryTest.php
+++ b/core/modules/system/src/Tests/Entity/EntityQueryTest.php
@@ -123,7 +123,7 @@ class EntityQueryTest extends EntityUnitTestBase {
// decimal 13 is binary 1101 so unit 3,2 and 0 will be added to the
// entity.
for ($i = 1; $i <= 15; $i++) {
- $entity = entity_create('entity_test_mulrev', array(
+ $entity = EntityTestMulRev::create(array(
'type' => $bundles[$i & 1],
'name' => $this->randomMachineName(),
'langcode' => 'en',