function EntityPropertiesTestCase::testEntityKeys

Tests entity_extract_ids() with an empty entity info.

File

modules/field/tests/field.test, line 3883

Class

EntityPropertiesTestCase
Tests entity properties.

Code

function testEntityKeys() {
    $entity_type = 'test_entity2';
    $entity = field_test_create_stub_entity();
    list($id, $vid, $bundle) = entity_extract_ids($entity_type, $entity);
    $this->assertNull($id, 'Entity id for test_entity2 returned NULL.');
    $this->assertNull($vid, 'Entity vid for test_entity2 returned NULL.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.