doTestReadWrite example

// The updated field value should have correctly saved as 'foo'.     $forward_revision = $storage->loadRevision($forward_revision_id);
    $this->assertEquals('foo', $forward_revision->field_test_text->value);
  }

  /** * Tests reading and writing properties and field items. */
  public function testReadWrite() {
    // All entity variations have to have the same results.     foreach (entity_test_entity_types() as $entity_type) {
      $this->doTestReadWrite($entity_type);
    }
  }

  /** * Executes the read write test set for a defined entity type. * * @param string $entity_type * The entity type to run the tests with. */
  protected function doTestReadWrite($entity_type) {
    $entity = $this->createTestEntity($entity_type);

    
Home | Imprint | This part of the site doesn't use cookies.