Commit 1a73d7e6 authored by alexpott's avatar alexpott

Issue #2328919 by Mile23, YesCT, tim.plunkett: Remove () from a bunch of...

Issue #2328919 by Mile23, YesCT, tim.plunkett: Remove () from a bunch of @covers definitions in PHPUnit
parent edd78896
......@@ -104,7 +104,7 @@ protected function setUp() {
*
* @dataProvider getLinkCombinations
*
* @covers ::buildCommentedEntityLinks()
* @covers ::buildCommentedEntityLinks
*/
public function testCommentLinkBuilder(NodeInterface $node, $context, $has_access_comments, $history_exists, $has_post_comments, $is_anonymous, $expected) {
$this->moduleHandler->expects($this->any())
......
......@@ -19,7 +19,7 @@ class CommentManagerTest extends UnitTestCase {
/**
* Tests the getFields method.
*
* @covers ::getFields()
* @covers ::getFields
*/
public function testGetFields() {
// Set up a content entity type.
......
......@@ -25,7 +25,7 @@ class ContentTranslationManageAccessCheckTest extends UnitTestCase {
/**
* Tests the create access method.
*
* @covers ::access()
* @covers ::access
*/
public function testCreateAccess() {
// Set the mock translation handler.
......
......@@ -175,7 +175,7 @@ public function testCalculateDependencies() {
}
/**
* @covers ::toArray()
* @covers ::toArray
*/
public function testToArray() {
$field = new FieldConfig(array(
......
......@@ -19,7 +19,7 @@ class ForumBreadcrumbBuilderBaseTest extends UnitTestCase {
/**
* Tests ForumBreadcrumbBuilderBase::__construct().
*
* @covers ::__construct()
* @covers ::__construct
*/
public function testConstructor() {
// Make some test doubles.
......
......@@ -86,7 +86,7 @@ protected function setUp() {
/**
* Tests locale lookups without fallback.
*
* @covers ::resolveCacheMiss()
* @covers ::resolveCacheMiss
*/
public function testResolveCacheMissWithoutFallback() {
$args = array(
......@@ -122,7 +122,7 @@ public function testResolveCacheMissWithoutFallback() {
*
* Note that context is irrelevant here. It is not used but it is required.
*
* @covers ::resolveCacheMiss()
* @covers ::resolveCacheMiss
*
* @dataProvider resolveCacheMissWithFallbackProvider
*/
......@@ -202,7 +202,7 @@ public function resolveCacheMissWithFallbackProvider() {
/**
* Tests locale lookups with persistent tracking.
*
* @covers ::resolveCacheMiss()
* @covers ::resolveCacheMiss
*/
public function testResolveCacheMissWithPersist() {
$args = array(
......@@ -234,7 +234,7 @@ public function testResolveCacheMissWithPersist() {
/**
* Tests locale lookups without a found translation.
*
* @covers ::resolveCacheMiss()
* @covers ::resolveCacheMiss
*/
public function testResolveCacheMissNoTranslation() {
$string = $this->getMock('Drupal\locale\StringInterface');
......
......@@ -20,7 +20,7 @@ class MigrationTest extends UnitTestCase {
/**
* Tests Migration::getProcessPlugins()
*
* @covers ::getProcessPlugins()
* @covers ::getProcessPlugins
*/
public function testGetProcessPlugins() {
$migration = new Migration([], 'migration');
......
......@@ -179,8 +179,8 @@ public function testHashing() {
/**
* Tests getting/setting the ID Map.
*
* @covers \Drupal\migrate\Row::setIdMap()
* @covers \Drupal\migrate\Row::getIdMap()
* @covers \Drupal\migrate\Row::setIdMap
* @covers \Drupal\migrate\Row::getIdMap
*/
public function testGetSetIdMap() {
$row = new Row($this->testValues, $this->testSourceIds);
......@@ -204,7 +204,7 @@ public function testSourceIdValues() {
/**
* Tests getting the source property.
*
* @covers \Drupal\migrate\Row::getSourceProperty()
* @covers \Drupal\migrate\Row::getSourceProperty
*/
public function testGetSourceProperty() {
$row = new Row($this->testValues, $this->testSourceIds);
......
......@@ -79,7 +79,7 @@ class PathBasedBreadcrumbBuilderTest extends UnitTestCase {
/**
* {@inheritdoc}
*
* @covers ::__construct()
* @covers ::__construct
*/
protected function setUp() {
parent::setUp();
......@@ -110,7 +110,7 @@ protected function setUp() {
/**
* Tests the build method on the frontpage.
*
* @covers ::build()
* @covers ::build
*/
public function testBuildOnFrontpage() {
$this->context->expects($this->once())
......@@ -124,7 +124,7 @@ public function testBuildOnFrontpage() {
/**
* Tests the build method with one path element.
*
* @covers ::build()
* @covers ::build
*/
public function testBuildWithOnePathElement() {
$this->context->expects($this->once())
......@@ -138,8 +138,8 @@ public function testBuildWithOnePathElement() {
/**
* Tests the build method with two path elements.
*
* @covers ::build()
* @covers ::getRequestForPath()
* @covers ::build
* @covers ::getRequestForPath
*/
public function testBuildWithTwoPathElements() {
$this->context->expects($this->once())
......@@ -170,8 +170,8 @@ public function testBuildWithTwoPathElements() {
/**
* Tests the build method with three path elements.
*
* @covers ::build()
* @covers ::getRequestForPath()
* @covers ::build
* @covers ::getRequestForPath
*/
public function testBuildWithThreePathElements() {
$this->context->expects($this->once())
......@@ -214,8 +214,8 @@ public function testBuildWithThreePathElements() {
/**
* Tests that exceptions during request matching are caught.
*
* @covers ::build()
* @covers ::getRequestForPath()
* @covers ::build
* @covers ::getRequestForPath
*
* @dataProvider providerTestBuildWithException
*/
......@@ -254,8 +254,8 @@ public function providerTestBuildWithException() {
/**
* Tests the build method with a non processed path.
*
* @covers ::build()
* @covers ::getRequestForPath()
* @covers ::build
* @covers ::getRequestForPath
*/
public function testBuildWithNonProcessedPath() {
$this->context->expects($this->once())
......@@ -279,7 +279,7 @@ public function testBuildWithNonProcessedPath() {
/**
* Tests the applied method.
*
* @covers ::applies()
* @covers ::applies
*/
public function testApplies() {
$this->assertTrue($this->builder->applies($this->getMock('Drupal\Core\Routing\RouteMatchInterface')));
......@@ -288,8 +288,8 @@ public function testApplies() {
/**
* Tests the breadcrumb for a user path.
*
* @covers ::build()
* @covers ::getRequestForPath()
* @covers ::build
* @covers ::getRequestForPath
*/
public function testBuildWithUserPath() {
$this->context->expects($this->once())
......
......@@ -26,7 +26,7 @@ class TourTest extends UnitTestCase {
* @param bool $result
* Expected result.
*
* @covers ::hasMatchingRoute()
* @covers ::hasMatchingRoute
*
* @dataProvider routeProvider
*/
......
......@@ -81,7 +81,7 @@ protected function setUp() {
}
/**
* @covers ::get()
* @covers ::get
*/
public function testGet() {
$this->keyValue->expects($this->at(0))
......@@ -100,7 +100,7 @@ public function testGet() {
/**
* Tests the getIfOwner() method.
*
* @covers ::getIfOwner()
* @covers ::getIfOwner
*/
public function testGetIfOwner() {
$this->keyValue->expects($this->at(0))
......@@ -124,7 +124,7 @@ public function testGetIfOwner() {
/**
* Tests the set() method with no lock available.
*
* @covers ::set()
* @covers ::set
* @expectedException \Drupal\user\TempStoreException
*/
public function testSetWithNoLockAvailable() {
......@@ -149,7 +149,7 @@ public function testSetWithNoLockAvailable() {
/**
* Tests a successful set() call.
*
* @covers ::set()
* @covers ::set
*/
public function testSet() {
$this->lock->expects($this->once())
......@@ -172,7 +172,7 @@ public function testSet() {
/**
* Tests the setIfNotExists() methods.
*
* @covers ::setIfNotExists()
* @covers ::setIfNotExists
*/
public function testSetIfNotExists() {
$this->keyValue->expects($this->once())
......@@ -186,7 +186,7 @@ public function testSetIfNotExists() {
/**
* Tests the setIfOwner() method when no key exists.
*
* @covers ::setIfOwner()
* @covers ::setIfOwner
*/
public function testSetIfOwnerWhenNotExists() {
$this->keyValue->expects($this->once())
......@@ -199,7 +199,7 @@ public function testSetIfOwnerWhenNotExists() {
/**
* Tests the setIfOwner() method when a key already exists but no object.
*
* @covers ::setIfOwner()
* @covers ::setIfOwner
*/
public function testSetIfOwnerNoObject() {
$this->keyValue->expects($this->once())
......@@ -217,7 +217,7 @@ public function testSetIfOwnerNoObject() {
/**
* Tests the setIfOwner() method with matching and non matching owners.
*
* @covers ::setIfOwner()
* @covers ::setIfOwner
*/
public function testSetIfOwner() {
$this->lock->expects($this->once())
......@@ -241,7 +241,7 @@ public function testSetIfOwner() {
/**
* Tests the getMetadata() method.
*
* @covers ::getMetadata()
* @covers ::getMetadata
*/
public function testGetMetadata() {
$this->keyValue->expects($this->at(0))
......@@ -265,7 +265,7 @@ public function testGetMetadata() {
/**
* Tests the delete() method.
*
* @covers ::delete()
* @covers ::delete
*/
public function testDelete() {
$this->lock->expects($this->once())
......@@ -288,7 +288,7 @@ public function testDelete() {
/**
* Tests the delete() method with no lock available.
*
* @covers ::delete()
* @covers ::delete
* @expectedException \Drupal\user\TempStoreException
*/
public function testDeleteWithNoLockAvailable() {
......@@ -313,7 +313,7 @@ public function testDeleteWithNoLockAvailable() {
/**
* Tests the deleteIfOwner() method.
*
* @covers ::deleteIfOwner()
* @covers ::deleteIfOwner
*/
public function testDeleteIfOwner() {
$this->lock->expects($this->once())
......
......@@ -42,8 +42,8 @@ protected function setUp() {
/**
* Tests the render method.
*
* @covers ::defineOptions()
* @covers ::render()
* @covers ::defineOptions
* @covers ::render
*/
public function testRender() {
// The handler is configured to show with empty views by default, so should
......
......@@ -20,7 +20,7 @@ class QueryParameterTest extends UnitTestCase {
/**
* Test the getArgument() method.
*
* @covers ::getArgument()
* @covers ::getArgument
* @dataProvider providerGetArgument
*/
public function testGetArgument($options, Request $request, $expected) {
......
......@@ -35,7 +35,7 @@ public static function getInfo() {
* @param string $message
* The message to provide as output for the test.
*
* @covers ::set()
* @covers ::set
*/
public function testSet($text, $message) {
$returned = SafeMarkup::set($text);
......@@ -63,7 +63,7 @@ public function providerSet() {
/**
* Tests SafeMarkup::set() and SafeMarkup::isSafe() with different providers.
*
* @covers ::isSafe()
* @covers ::isSafe
*/
public function testStrategy() {
$returned = SafeMarkup::set('string0', 'html');
......@@ -79,7 +79,7 @@ public function testStrategy() {
/**
* Tests SafeMarkup::setMultiple().
*
* @covers ::setMultiple()
* @covers ::setMultiple
*/
public function testSetMultiple() {
$texts = array(
......@@ -97,7 +97,7 @@ public function testSetMultiple() {
*
* Only TRUE may be passed in as the value.
*
* @covers ::setMultiple()
* @covers ::setMultiple
*
* @expectedException \UnexpectedValueException
*/
......
......@@ -498,7 +498,7 @@ public function testCheckNamedRouteWithUpcastedValues() {
/**
* Tests the checkNamedRoute with default values.
*
* @covers \Drupal\Core\Access\AccessManager::checkNamedRoute()
* @covers \Drupal\Core\Access\AccessManager::checkNamedRoute
*/
public function testCheckNamedRouteWithDefaultValue() {
$this->routeCollection = new RouteCollection();
......
......@@ -31,7 +31,7 @@ protected function setUp() {
}
/**
* @covers \Drupal\Core\Annotation\Translation::get()
* @covers \Drupal\Core\Annotation\Translation::get
*
* @dataProvider providerTestGet
*/
......
......@@ -71,7 +71,7 @@ protected function setUp() {
/**
* Tests that basic functionality works for getLibraryByName.
*
* @covers ::buildByExtension()
* @covers ::buildByExtension
*/
public function testBuildByExtensionSimple() {
$this->moduleHandler->expects($this->atLeastOnce())
......@@ -98,7 +98,7 @@ public function testBuildByExtensionSimple() {
/**
* Tests that a theme can be used instead of a module.
*
* @covers ::buildByExtension()
* @covers ::buildByExtension
*/
public function testBuildByExtensionWithTheme() {
$this->moduleHandler->expects($this->atLeastOnce())
......@@ -122,7 +122,7 @@ public function testBuildByExtensionWithTheme() {
/**
* Tests that a module with a missing library file results in FALSE.
*
* @covers ::buildByExtension()
* @covers ::buildByExtension
*/
public function testBuildByExtensionWithMissingLibraryFile() {
$this->moduleHandler->expects($this->atLeastOnce())
......@@ -142,7 +142,7 @@ public function testBuildByExtensionWithMissingLibraryFile() {
*
* @expectedException \Drupal\Core\Asset\Exception\InvalidLibraryFileException
*
* @covers ::buildByExtension()
* @covers ::buildByExtension
*/
public function testInvalidLibrariesFile() {
$this->moduleHandler->expects($this->atLeastOnce())
......@@ -163,7 +163,7 @@ public function testInvalidLibrariesFile() {
* @expectedException \Drupal\Core\Asset\Exception\IncompleteLibraryDefinitionException
* @expectedExceptionMessage Incomplete library definition for 'example' in core/tests/Drupal/Tests/Core/Asset/library_test_files/example_module_missing_information.libraries.yml
*
* @covers ::buildByExtension()
* @covers ::buildByExtension
*/
public function testBuildByExtensionWithMissingInformation() {
$this->moduleHandler->expects($this->atLeastOnce())
......@@ -181,7 +181,7 @@ public function testBuildByExtensionWithMissingInformation() {
/**
* Tests that the version property of external libraries is handled.
*
* @covers ::buildByExtension()
* @covers ::buildByExtension
*/
public function testExternalLibraries() {
$this->moduleHandler->expects($this->atLeastOnce())
......@@ -203,7 +203,7 @@ public function testExternalLibraries() {
/**
* Ensures that CSS weights are taken into account properly.
*
* @covers ::buildByExtension()
* @covers ::buildByExtension
*/
public function testDefaultCssWeights() {
$this->moduleHandler->expects($this->atLeastOnce())
......@@ -243,7 +243,7 @@ public function testDefaultCssWeights() {
*
* @expectedException \UnexpectedValueException
*
* @covers ::buildByExtension()
* @covers ::buildByExtension
*/
public function testJsWithPositiveWeight() {
$this->moduleHandler->expects($this->atLeastOnce())
......@@ -261,7 +261,7 @@ public function testJsWithPositiveWeight() {
/**
* Tests a library with CSS/JavaScript and a setting.
*
* @covers ::buildByExtension()
* @covers ::buildByExtension
*/
public function testLibraryWithCssJsSetting() {
$this->moduleHandler->expects($this->atLeastOnce())
......@@ -292,7 +292,7 @@ public function testLibraryWithCssJsSetting() {
/**
* Tests a library with dependencies.
*
* @covers ::buildByExtension()
* @covers ::buildByExtension
*/
public function testLibraryWithDependencies() {
$this->moduleHandler->expects($this->atLeastOnce())
......@@ -315,7 +315,7 @@ public function testLibraryWithDependencies() {
/**
* Tests a library with a couple of data formats like full URL.
*
* @covers ::buildByExtension()
* @covers ::buildByExtension
*/
public function testLibraryWithDataTypes() {
$this->moduleHandler->expects($this->atLeastOnce())
......@@ -347,7 +347,7 @@ public function testLibraryWithDataTypes() {
/**
* Tests a library with JavaScript-specific flags.
*
* @covers ::buildByExtension()
* @covers ::buildByExtension
*/
public function testLibraryWithJavaScript() {
$this->moduleHandler->expects($this->atLeastOnce())
......@@ -372,7 +372,7 @@ public function testLibraryWithJavaScript() {
* @expectedException \Drupal\Core\Asset\Exception\LibraryDefinitionMissingLicenseException
* @expectedExceptionMessage Missing license information in library definition for 'no-license-info-but-remote' in core/tests/Drupal/Tests/Core/Asset/library_test_files/licenses_missing_information.libraries.yml: it has a remote, but no license.
*
* @covers ::buildByExtension()
* @covers ::buildByExtension
*/
public function testLibraryThirdPartyWithMissingLicense() {
$this->moduleHandler->expects($this->atLeastOnce())
......@@ -390,7 +390,7 @@ public function testLibraryThirdPartyWithMissingLicense() {
/**
* Tests a library with various licenses, some GPL-compatible, some not.
*
* @covers ::buildByExtension()
* @covers ::buildByExtension
*/
public function testLibraryWithLicenses() {
$this->moduleHandler->expects($this->atLeastOnce())
......
......@@ -99,7 +99,7 @@ class ConfigEntityStorageTest extends UnitTestCase {
/**
* {@inheritdoc}
*
* @covers ::__construct()
* @covers ::__construct
*/
protected function setUp() {
parent::setUp();
......@@ -169,8 +169,8 @@ protected function setUp() {
}
/**
* @covers ::create()
* @covers ::doCreate()
* @covers ::create
* @covers ::doCreate
*/
public function testCreateWithPredefinedUuid() {
$this->cacheBackend->expects($this->never())
......@@ -192,8 +192,8 @@ public function testCreateWithPredefinedUuid() {
}
/**
* @covers ::create()
* @covers ::doCreate()
* @covers ::create
* @covers ::doCreate
*
* @return \Drupal\Core\Entity\EntityInterface
*/
......@@ -219,8 +219,8 @@ public function testCreate() {
}
/**
* @covers ::save()
* @covers ::doSave()
* @covers ::save
* @covers ::doSave
*
* @param \Drupal\Core\Entity\EntityInterface $entity
*
......@@ -278,8 +278,8 @@ public function testSaveInsert(EntityInterface $entity) {
}
/**
* @covers ::save()
* @covers ::doSave()
* @covers ::save
* @covers ::doSave
*
* @param \Drupal\Core\Entity\EntityInterface $entity
*
......@@ -342,8 +342,8 @@ public function testSaveUpdate(EntityInterface $entity) {
}
/**
* @covers ::save()
* @covers ::doSave()
* @covers ::save
* @covers ::doSave
*
* @depends testSaveInsert
*/
......@@ -397,7 +397,7 @@ public function testSaveRename(ConfigEntityInterface $entity) {
}
/**
* @covers ::save()
* @covers ::save
*
* @expectedException \Drupal\Core\Entity\EntityMalformedException
* @expectedExceptionMessage The entity does not have an ID.
......@@ -411,8 +411,8 @@ public function testSaveInvalid() {
}
/**
* @covers ::save()
* @covers ::doSave()
* @covers ::save
* @covers ::doSave
*
* @expectedException \Drupal\Core\Entity\EntityStorageException
*/
......@@ -443,8 +443,8 @@ public function testSaveDuplicate() {
}
/**
* @covers ::save()
* @covers ::doSave()
* @covers ::save
* @covers ::doSave
*
* @expectedException \Drupal\Core\Config\ConfigDuplicateUUIDException
* @expectedExceptionMessage when this UUID is already used for
......@@ -479,8 +479,8 @@ public function testSaveMismatch() {
}