diff --git a/core/modules/user/tests/Drupal/Tests/user/Views/Argument/RolesRidTest.php b/core/modules/user/tests/Drupal/Tests/user/Views/Argument/RolesRidTest.php index 762558a..d5bbf59 100644 --- a/core/modules/user/tests/Drupal/Tests/user/Views/Argument/RolesRidTest.php +++ b/core/modules/user/tests/Drupal/Tests/user/Views/Argument/RolesRidTest.php @@ -60,8 +60,9 @@ public function testTitleQuery() { $config_factory = $this->getConfigFactoryStub($config); $config_storage = $this->getConfigStorageStub($config); - // Creates a stub roles storage controller and replace the attachLoad method - // with a empty version, because attachLoad calls module_implements. + // Creates a stub role storage controller and replace the attachLoad() + // method with an empty version, because attachLoad() calls + // module_implements(). $role_storage_controller = $this->getMock('Drupal\user\RoleStorageController', array('attachLoad'), array('user_role', static::$entityInfo, $config_factory, $config_storage)); @@ -80,9 +81,9 @@ public function testTitleQuery() { ->with($this->equalTo('user_role')) ->will($this->returnValue($role_storage_controller)); - // \Drupal\Core\Entity\Entity::entityInfo() uses an not injected global - // call so set it until entity has the entity info injected. - + // @todo \Drupal\Core\Entity\Entity::entityInfo() uses a global call to + // entity_get_info(), which in turn wraps \Drupal::entityManager(). Set + // the entity manager until this is fixed. $container = new ContainerBuilder(); $container->set('plugin.manager.entity', $entity_manager); \Drupal::setContainer($container); diff --git a/core/tests/Drupal/Tests/UnitTestCase.php b/core/tests/Drupal/Tests/UnitTestCase.php index d4e7dbe..1856011 100644 --- a/core/tests/Drupal/Tests/UnitTestCase.php +++ b/core/tests/Drupal/Tests/UnitTestCase.php @@ -8,7 +8,7 @@ namespace Drupal\Tests; /** - * Common base class for unit tests which provides some drupal related help. + * Provides a base class and helpers for Drupal unit tests. */ abstract class UnitTestCase extends \PHPUnit_Framework_TestCase { @@ -109,12 +109,12 @@ public function getConfigFactoryStub($configs) { } /** - * Returns a stub config storage that behaves according to the passed in array. + * Returns a stub config storage that returns the supplied configuration. * * @param array $configs - * An associative array of configuration settings whose keys are configuration - * object names and whose values are key => value arrays for the configuration - * object in question. + * An associative array of configuration settings whose keys are + * configuration object names and whose values are key => value arrays + * for the configuration object in question. * * @return \Drupal\Core\Config\StorageInterface * A mocked config storage.