You are here

public function EntityTest::test in Autoload 7.2

Same name and namespace in other branches
  1. 7 src/Tests/Unit/EntityTest.php \Drupal\autoload\Tests\Unit\EntityTest::test()

File

src/Tests/Unit/EntityTest.php, line 25

Class

EntityTest
Class EntityTest.

Namespace

Drupal\autoload\Tests\Unit

Code

public function test() {

  // The next error must not appear:
  // Error: Class 'Drupal\autoload_test_entity_ui\ViewsController' not found
  // in entity_views_data() (line 31 of sites/all/modules/entity/views/entity.
  // views.inc).
  $entity_info = entity_get_info('autoload_test_entity');
  $this
    ->assertTrue(class_exists($entity_info['views controller class']), 'Views controller class for entity loaded successfully.');
}