You are here

public function PlugBasicTest::testModuleDirectories in Plug 7

Checks the Module::getModuleDirectories() method.

File

lib/Drupal/plug/Tests/PlugBasicTest.php, line 35
Basic tests cases for plug module.

Class

PlugBasicTest

Namespace

Drupal\plug\Tests

Code

public function testModuleDirectories() {
  $expected_values = array(
    'plug' => drupal_get_path('module', 'plug'),
    'field' => 'modules/field',
    'field_sql_storage' => 'modules/field/modules/field_sql_storage',
    'filter' => 'modules/filter',
    'node' => 'modules/node',
    'user' => 'modules/user',
    'standard' => 'profiles/standard',
    'system' => 'modules/system',
  );
  $directories = Module::getDirectories();
  $this
    ->assertEqual($expected_values, array_intersect_assoc($directories, $expected_values));
  $cached_data = cache_get('module_directories');
  $this
    ->assertEqual($expected_values, array_intersect_assoc($cached_data->data, $expected_values));
}