class EntityTest in Autoload 7.2
Same name and namespace in other branches
- 7 src/Tests/Unit/EntityTest.php \Drupal\autoload\Tests\Unit\EntityTest
Class EntityTest.
Hierarchy
- class \Drupal\autoload\Tests\Unit\AutoloadTestBase extends \Drupal\autoload\Tests\Unit\DrupalWebTestCase
- class \Drupal\autoload\Tests\Unit\EntityTest
Expanded class hierarchy of EntityTest
File
- src/
Tests/ Unit/ EntityTest.php, line 8
Namespace
Drupal\autoload\Tests\UnitView source
class EntityTest extends AutoloadTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = array(
'autoload_test_entity_ui',
);
/**
* {@inheritdoc}
*/
public static function getInfo() {
return static::info(t('Ensure autoloading is properly operable in entity hooks.'));
}
/**
* {@inheritdoc}
*/
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.');
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AutoloadTestBase:: |
protected | property | A path to file with the autoloading class map. | |
AutoloadTestBase:: |
protected | property | ||
AutoloadTestBase:: |
protected static | function | Returns an information about the test. | |
AutoloadTestBase:: |
protected | function | ||
AutoloadTestBase:: |
protected | function | ||
EntityTest:: |
protected static | property |
Modules which should enabled for testing. Overrides AutoloadTestBase:: |
|
EntityTest:: |
public static | function | ||
EntityTest:: |
public | function |