Issue #2609904 by timmillwood, dawehner: Replace deprecated entity_create() calls in NormalizerTestBase

8.0.x
xjm 2015-11-14 17:24:40 -06:00
parent a13ccc5a60
commit 10226842ab
1 changed files with 5 additions and 3 deletions

View File

@ -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 @@ abstract class NormalizerTestBase extends KernelTestBase {
\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',