Commit 10226842 authored by xjm's avatar xjm

Issue #2609904 by timmillwood, dawehner: Replace deprecated entity_create()...

Issue #2609904 by timmillwood, dawehner: Replace deprecated entity_create() calls in NormalizerTestBase
parent a13ccc5a
......@@ -7,7 +7,9 @@
namespace Drupal\serialization\Tests;
use Drupal\simpletest\KernelTestBase;
use Drupal\KernelTests\KernelTestBase;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
abstract class NormalizerTestBase extends KernelTestBase {
......@@ -29,14 +31,14 @@ protected function setUp() {
\Drupal::moduleHandler()->invoke('rest', 'install');
// Auto-create a field for testing.
entity_create('field_storage_config', array(
FieldstorageConfig::create(array(
'entity_type' => 'entity_test_mulrev',
'field_name' => 'field_test_text',
'type' => 'text',
'cardinality' => 1,
'translatable' => FALSE,
))->save();
entity_create('field_config', array(
FieldConfig::create(array(
'entity_type' => 'entity_test_mulrev',
'field_name' => 'field_test_text',
'bundle' => 'entity_test_mulrev',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment