You are here

public function EntityMetadataIntegrationTestCase::testSystemProperties in Entity API 7

Test properties provided by system module.

File

./entity.test, line 1832
Entity CRUD API tests.

Class

EntityMetadataIntegrationTestCase
Tests provided entity property info of the core modules.

Code

public function testSystemProperties() {
  $wrapper = entity_metadata_site_wrapper();
  foreach ($wrapper as $key => $value) {
    $this
      ->assertValue($wrapper, $key);
  }

  // Test page request related properties.
  foreach ($wrapper->current_page as $key => $value) {
    $this
      ->assertValue($wrapper->current_page, $key);
  }

  // Test files.
  $file = $this
    ->createFile();
  $wrapper = entity_metadata_wrapper('file', $file);
  foreach ($wrapper as $key => $value) {
    $this
      ->assertValue($wrapper, $key);
  }
}