/**
  * Checks the Module::getNamespaces() method.
  */
 public function testModuleNamespaces()
 {
     $expected_values = array('Drupal\\plug' => drupal_get_path('module', 'plug') . '/src', 'Drupal\\field' => 'modules/field/src', 'Drupal\\field_sql_storage' => 'modules/field/modules/field_sql_storage/src', 'Drupal\\filter' => 'modules/filter/src', 'Drupal\\node' => 'modules/node/src', 'Drupal\\user' => 'modules/user/src', 'Drupal\\standard' => 'profiles/standard/src', 'Drupal\\system' => 'modules/system/src');
     $namespaces = Module::getNamespaces();
     $this->assertEqual($expected_values, array_intersect_assoc($namespaces->getArrayCopy(), $expected_values));
     $cached_data = cache_get('module_namespaces');
     $this->assertEqual($expected_values, array_intersect_assoc($cached_data->data, $expected_values));
 }
 /**
  * RateLimitPluginManager factory method.
  *
  * @param string $bin
  *   The cache bin for the plugin manager.
  *
  * @return RateLimitPluginManager
  *   The created manager.
  */
 public static function create($bin = 'cache')
 {
     return new static(Module::getNamespaces(), _cache_get_object($bin));
 }
 /**
  * ResourcePluginManager factory method.
  *
  * @param string $bin
  *   The cache bin for the plugin manager.
  * @param RequestInterface $request
  *   The request object.
  *
  * @return ResourcePluginManager
  *   The created manager.
  */
 public static function create($bin = 'cache', RequestInterface $request = NULL)
 {
     return new static(Module::getNamespaces(), _cache_get_object($bin), $request);
 }