diff --git a/core/modules/contact/tests/src/Unit/MailHandlerTest.php b/core/modules/contact/tests/src/Unit/MailHandlerTest.php index 2c49b64..b650f2f 100644 --- a/core/modules/contact/tests/src/Unit/MailHandlerTest.php +++ b/core/modules/contact/tests/src/Unit/MailHandlerTest.php @@ -94,7 +94,6 @@ class MailHandlerTest extends UnitTestCase { /** * Tests the children() method with an invalid key. * - * * @covers ::sendMailMessages */ public function testInvalidRecipient() { diff --git a/core/modules/migrate/tests/src/Kernel/process/CopyFileTest.php b/core/modules/migrate/tests/src/Kernel/process/CopyFileTest.php index 84065f8..7a253b3 100644 --- a/core/modules/migrate/tests/src/Kernel/process/CopyFileTest.php +++ b/core/modules/migrate/tests/src/Kernel/process/CopyFileTest.php @@ -7,6 +7,7 @@ use Drupal\KernelTests\Core\File\FileTestBase; use Drupal\migrate\MigrateExecutableInterface; use Drupal\migrate\Plugin\migrate\process\FileCopy; use Drupal\migrate\Row; +use Drupal\migrate\MigrationException; /** * Tests the copy_file process plugin. @@ -135,11 +136,10 @@ class CopyFileTest extends FileTestBase { /** * Test that non-existent files throw an exception. - * */ public function testNonExistentSourceFile() { $source = '/non/existent/file'; - $this->setExpectedException('\Drupal\migrate\MigrateException', "File '/non/existent/file' does not exist"); // ALGO LAST + $this->setExpectedException(MigrationException::class, "File '/non/existent/file' does not exist"); // ALGO LAST $this->doImport($source, 'public://wontmatter.jpg'); } diff --git a/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php b/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php index bd7d6a8..9e3e6d4 100644 --- a/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php +++ b/core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php @@ -8,6 +8,7 @@ use Drupal\migrate\Plugin\migrate\process\FileCopy; use Drupal\migrate\MigrateExecutableInterface; use Drupal\migrate\Plugin\MigrateProcessInterface; use Drupal\migrate\Row; +use Drupal\migrate\MigrationException; /** * Tests the file_copy process plugin. @@ -110,11 +111,10 @@ class FileCopyTest extends FileTestBase { /** * Test that non-existent files throw an exception. - * */ public function testNonExistentSourceFile() { $source = '/non/existent/file'; - $this->setExpectedException('\Drupal\migrate\MigrateException', "File '/non/existent/file' does not exist"); // ALGO LAST + $this->setExpectedException(MigrationException::class, "File '/non/existent/file' does not exist"); // ALGO LAST $this->doTransform($source, 'public://wontmatter.jpg'); } diff --git a/core/modules/migrate/tests/src/Unit/MigrateSourceTest.php b/core/modules/migrate/tests/src/Unit/MigrateSourceTest.php index 7c7c0cd..69d10d2 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateSourceTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateSourceTest.php @@ -17,6 +17,7 @@ use Drupal\migrate\MigrateSkipRowException; use Drupal\migrate\Plugin\migrate\source\SourcePluginBase; use Drupal\migrate\Plugin\MigrateIdMapInterface; use Drupal\migrate\Row; +use Drupal\migrate\MigrationException; /** * @coversDefaultClass \Drupal\migrate\Plugin\migrate\source\SourcePluginBase @@ -152,7 +153,7 @@ class MigrateSourceTest extends MigrateTestCase { */ public function testHighwaterTrackChangesIncompatible() { $source_config = ['track_changes' => TRUE, 'high_water_property' => ['name' => 'something']]; - $this->setExpectedException('\Drupal\migrate\MigrateException'); // ALGO LAST + $this->setExpectedException(MigrationException::class); // ALGO LAST $this->getSource($source_config); } diff --git a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php index b061840..442e6e7 100644 --- a/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php +++ b/core/modules/migrate/tests/src/Unit/Plugin/migrate/destination/EntityContentBaseTest.php @@ -18,6 +18,7 @@ use Drupal\migrate\Plugin\migrate\destination\EntityContentBase; use Drupal\migrate\Plugin\MigrateIdMapInterface; use Drupal\migrate\Row; use Drupal\Tests\UnitTestCase; +use Drupal\migrate\MigrationException; /** * Tests base entity migration destination functionality. @@ -94,7 +95,7 @@ class EntityContentBaseTest extends UnitTestCase { $this->entityManager->reveal(), $this->prophesize(FieldTypePluginManagerInterface::class)->reveal()); $destination->setEntity(FALSE); - $this->setExpectedException('\Drupal\migrate\MigrateException', 'Unable to get entity'); // ALGO COVER (method) + $this->setExpectedException(MigrationException::class, 'Unable to get entity'); // ALGO COVER (method) $destination->import(new Row()); } @@ -121,7 +122,7 @@ class EntityContentBaseTest extends UnitTestCase { $this->entityManager->reveal(), $this->prophesize(FieldTypePluginManagerInterface::class)->reveal() ); - $this->setExpectedException('\Drupal\migrate\MigrateException', 'This entity type does not support translation'); // ALGO LAST + $this->setExpectedException(MigrationException::class, 'This entity type does not support translation'); // ALGO LAST $destination->getIds(); } diff --git a/core/modules/migrate/tests/src/Unit/RowTest.php b/core/modules/migrate/tests/src/Unit/RowTest.php index d62f3ff..e70d1be 100644 --- a/core/modules/migrate/tests/src/Unit/RowTest.php +++ b/core/modules/migrate/tests/src/Unit/RowTest.php @@ -87,8 +87,8 @@ class RowTest extends UnitTestCase { */ public function testSourceFreeze() { $row = new Row($this->testValues, $this->testSourceIds); - $row->rehash(); $this->setExpectedException('\Exception'); // ALGO ASSERT + $row->rehash(); $this->assertSame($this->testHash, $row->getHash(), 'Correct hash.'); $row->setSourceProperty('title', 'new title'); $row->rehash(); diff --git a/core/modules/migrate/tests/src/Unit/process/ConcatTest.php b/core/modules/migrate/tests/src/Unit/process/ConcatTest.php index ca1237f..b38ffe9 100644 --- a/core/modules/migrate/tests/src/Unit/process/ConcatTest.php +++ b/core/modules/migrate/tests/src/Unit/process/ConcatTest.php @@ -8,6 +8,7 @@ namespace Drupal\Tests\migrate\Unit\process; use Drupal\migrate\Plugin\migrate\process\Concat; +use Drupal\migrate\MigrationException; /** * Tests the concat process plugin. @@ -36,7 +37,7 @@ class ConcatTest extends MigrateProcessTestCase { * Test concat fails properly on non-arrays. */ public function testConcatWithNonArray() { - $this->setExpectedException('\Drupal\migrate\MigrateException'); // ALGO ONE + $this->setExpectedException(MigrationException::class); // ALGO ONE $this->plugin->transform('foo', $this->migrateExecutable, $this->row, 'destinationproperty'); } diff --git a/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php b/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php index ebcdc14..dac2270 100644 --- a/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php +++ b/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php @@ -4,6 +4,7 @@ namespace Drupal\Tests\migrate\Unit\process; use Drupal\migrate\Plugin\migrate\process\Explode; use Drupal\migrate\Plugin\migrate\process\Concat; +use Drupal\migrate\MigrationException; /** * Tests the Explode process plugin. @@ -53,20 +54,18 @@ class ExplodeTest extends MigrateProcessTestCase { /** * Test explode fails properly on non-strings. - * */ public function testExplodeWithNonString() { - $this->setExpectedException('\Drupal\migrate\MigrateException', 'is not a string'); // ALGO ONE + $this->setExpectedException(MigrationException::class, 'is not a string'); // ALGO ONE $this->plugin->transform(['foo'], $this->migrateExecutable, $this->row, 'destinationproperty'); } /** * Test explode fails with empty delimiter. - * */ public function testExplodeWithEmptyDelimiter() { $plugin = new Explode(['delimiter' => ''], 'map', []); - $this->setExpectedException('\Drupal\migrate\MigrateException', 'delimiter is empty'); // ALGO LAST + $this->setExpectedException(MigrationException::class, 'delimiter is empty'); // ALGO LAST $plugin->transform('foo,bar', $this->migrateExecutable, $this->row, 'destinationproperty'); } diff --git a/core/modules/migrate/tests/src/Unit/process/ExtractTest.php b/core/modules/migrate/tests/src/Unit/process/ExtractTest.php index 9cf8e8d..07cf2c1 100644 --- a/core/modules/migrate/tests/src/Unit/process/ExtractTest.php +++ b/core/modules/migrate/tests/src/Unit/process/ExtractTest.php @@ -3,6 +3,7 @@ namespace Drupal\Tests\migrate\Unit\process; use Drupal\migrate\Plugin\migrate\process\Extract; +use Drupal\migrate\MigrationException; /** * @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\Extract @@ -31,7 +32,7 @@ class ExtractTest extends MigrateProcessTestCase { * Tests invalid input. */ public function testExtractFromString() { - $this->setExpectedException('\Drupal\migrate\MigrateException', 'Input should be an array.'); // ALGO ONE + $this->setExpectedException(MigrationException::class, 'Input should be an array.'); // ALGO ONE $this->plugin->transform('bar', $this->migrateExecutable, $this->row, 'destinationproperty'); } @@ -39,7 +40,7 @@ class ExtractTest extends MigrateProcessTestCase { * Tests unsuccessful extraction. */ public function testExtractFail() { - $this->setExpectedException('\Drupal\migrate\MigrateException', 'Array index missing, extraction failed.'); // ALGO ONE + $this->setExpectedException(MigrationException::class, 'Array index missing, extraction failed.'); // ALGO ONE $this->plugin->transform(array('bar' => 'foo'), $this->migrateExecutable, $this->row, 'destinationproperty'); } diff --git a/core/modules/migrate/tests/src/Unit/process/StaticMapTest.php b/core/modules/migrate/tests/src/Unit/process/StaticMapTest.php index 9bf591e..2525a79 100644 --- a/core/modules/migrate/tests/src/Unit/process/StaticMapTest.php +++ b/core/modules/migrate/tests/src/Unit/process/StaticMapTest.php @@ -3,6 +3,7 @@ namespace Drupal\Tests\migrate\Unit\process; use Drupal\migrate\Plugin\migrate\process\StaticMap; +use Drupal\migrate\MigrationException; /** * Tests the static map process plugin. @@ -40,7 +41,7 @@ class StaticMapTest extends MigrateProcessTestCase { * Tests when the source is empty. */ public function testMapwithEmptySource() { - $this->setExpectedException('\Drupal\migrate\MigrateException'); // ALGO ONE + $this->setExpectedException(MigrationException::class); // ALGO ONE $this->plugin->transform(array(), $this->migrateExecutable, $this->row, 'destinationproperty'); } @@ -82,7 +83,7 @@ class StaticMapTest extends MigrateProcessTestCase { $configuration['default_value'] = 'test'; $configuration['bypass'] = TRUE; $this->plugin = new StaticMap($configuration, 'map', array()); - $this->setExpectedException('\Drupal\migrate\MigrateException', 'Setting both default_value and bypass is invalid.'); // ALGO LAST + $this->setExpectedException(MigrationException::class, 'Setting both default_value and bypass is invalid.'); // ALGO LAST $this->plugin->transform(array('bar'), $this->migrateExecutable, $this->row, 'destinationproperty'); } diff --git a/core/modules/migrate/tests/src/Unit/process/SubstrTest.php b/core/modules/migrate/tests/src/Unit/process/SubstrTest.php index 21c3c2d..f30b9cc 100644 --- a/core/modules/migrate/tests/src/Unit/process/SubstrTest.php +++ b/core/modules/migrate/tests/src/Unit/process/SubstrTest.php @@ -3,6 +3,7 @@ namespace Drupal\Tests\migrate\Unit\process; use Drupal\migrate\Plugin\migrate\process\Substr; +use Drupal\migrate\MigrationException; /** * Tests the substr plugin. @@ -59,7 +60,7 @@ class SubstrTest extends MigrateProcessTestCase { public function testSubstrFail() { $configuration = []; $this->plugin = new Substr($configuration, 'map', []); - $this->setExpectedException('\Drupal\migrate\MigrateException', 'The input value must be a string.'); // ALGO LAST + $this->setExpectedException(MigrationException::class, 'The input value must be a string.'); // ALGO LAST $this->plugin->transform(['Captain Janeway'], $this->migrateExecutable, $this->row, 'destinationproperty'); } @@ -69,7 +70,7 @@ class SubstrTest extends MigrateProcessTestCase { public function testStartIsString() { $configuration['start'] = '2'; $this->plugin = new Substr($configuration, 'map', []); - $this->setExpectedException('\Drupal\migrate\MigrateException', 'The start position configuration value should be an integer. Omit this key to capture from the beginning of the string.'); // ALGO LAST + $this->setExpectedException(MigrationException::class, 'The start position configuration value should be an integer. Omit this key to capture from the beginning of the string.'); // ALGO LAST $this->plugin->transform(['foo'], $this->migrateExecutable, $this->row, 'destinationproperty'); } @@ -79,7 +80,7 @@ class SubstrTest extends MigrateProcessTestCase { public function testLengthIsString() { $configuration['length'] = '1'; $this->plugin = new Substr($configuration, 'map', []); - $this->setExpectedException('\Drupal\migrate\MigrateException', 'The character length configuration value should be an integer. Omit this key to capture from the start position to the end of the string.'); // ALGO LAST + $this->setExpectedException(MigrationException::class, 'The character length configuration value should be an integer. Omit this key to capture from the start position to the end of the string.'); // ALGO LAST $this->plugin->transform(['foo'], $this->migrateExecutable, $this->row, 'destinationproperty'); } diff --git a/core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php b/core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php index 6578765..c025d8d 100644 --- a/core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php +++ b/core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php @@ -177,7 +177,6 @@ class EntityNormalizerTest extends UnitTestCase { /** * Tests the denormalize method with a bundle property. * - * * @covers ::denormalize */ public function testDenormalizeWithInvalidBundle() { diff --git a/core/modules/views/tests/src/Unit/ViewExecutableTest.php b/core/modules/views/tests/src/Unit/ViewExecutableTest.php index b1fee64..37c08e7 100644 --- a/core/modules/views/tests/src/Unit/ViewExecutableTest.php +++ b/core/modules/views/tests/src/Unit/ViewExecutableTest.php @@ -182,7 +182,6 @@ class ViewExecutableTest extends UnitTestCase { } /** - * * @covers ::getUrl */ public function testGetUrlWithoutRouterDisplay() { diff --git a/core/tests/Drupal/KernelTests/Component/Utility/SafeMarkupKernelTest.php b/core/tests/Drupal/KernelTests/Component/Utility/SafeMarkupKernelTest.php index cc94c19..ad8a93e 100644 --- a/core/tests/Drupal/KernelTests/Component/Utility/SafeMarkupKernelTest.php +++ b/core/tests/Drupal/KernelTests/Component/Utility/SafeMarkupKernelTest.php @@ -110,7 +110,7 @@ class SafeMarkupKernelTest extends KernelTestBase { */ public function testSafeMarkupUriWithExceptionUri($string, $uri) { // Should throw an \InvalidArgumentException, due to Uri::toString(). - $this->setExpectedException('\InvalidArgumentException'); // ALGO LAST (MANUAL CHIT) + $this->setExpectedException('\InvalidArgumentException'); // ALGO MANUAL MAP $args = self::getSafeMarkupUriArgs($uri); SafeMarkup::format($string, $args); diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php index 9cf5616..82e6078 100644 --- a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php +++ b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php @@ -605,7 +605,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase { public function testResolveServicesAndParametersForInvalidArguments() { // In case the machine-optimized format is not used, we need to simulate the // test failure. - $this->setExpectedException('\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException'); // ALGO COVER (method) (MANUAL CHIT) + $this->setExpectedException('\Symfony\Component\DependencyInjection\Exception\InvalidArgumentException'); // ALGO MANUAL MAP if (!$this->machineFormat) { throw new InvalidArgumentException('Simulating the test failure.'); } @@ -656,7 +656,6 @@ class ContainerTest extends \PHPUnit_Framework_TestCase { * @covers ::hasScope * @covers ::isScopeActive * - * * @dataProvider scopeExceptionTestProvider */ public function testScopeFunctionsWithException($method, $argument) { diff --git a/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php b/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php index 7175edb..632938b 100644 --- a/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php +++ b/core/tests/Drupal/Tests/Component/Plugin/Discovery/DiscoveryTraitTest.php @@ -66,9 +66,9 @@ class DiscoveryTraitTest extends UnitTestCase { $trait = $this->getMockForTrait('Drupal\Component\Plugin\Discovery\DiscoveryTrait'); // Un-protect the method using reflection. $method_ref = new \ReflectionMethod($trait, 'doGetDefinition'); + $this->setExpectedException('\Drupal\Component\Plugin\Exception\PluginNotFoundException'); // ALGO ASSERT $method_ref->setAccessible(TRUE); // Call doGetDefinition, with $exception_on_invalid always TRUE. - $this->setExpectedException('\Drupal\Component\Plugin\Exception\PluginNotFoundException'); // ALGO ASSERT $this->assertSame( $expected, $method_ref->invoke($trait, $definitions, $plugin_id, TRUE) diff --git a/core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php b/core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php index d0aa578..ca67d28 100644 --- a/core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/ArgumentsResolverTest.php @@ -128,7 +128,7 @@ class ArgumentsResolverTest extends UnitTestCase { $resolver = new ArgumentsResolver([], [], $wildcards); $callable = function($route) {}; - $this->setExpectedException('\RuntimeException', 'requires a value for the "$route" argument.'); // ALGO ASSERT (MANUAL CHIT) + $this->setExpectedException('\RuntimeException', 'requires a value for the "$route" argument.'); // ALGO ASSERT $arguments = $resolver->getArguments($callable); $this->assertNull($arguments); } @@ -157,21 +157,20 @@ class ArgumentsResolverTest extends UnitTestCase { $resolver = new ArgumentsResolver($scalars, $objects, []); $callable = function(\stdClass $foo) {}; - $arguments = $resolver->getArguments($callable); $this->setExpectedException('\RuntimeException', 'requires a value for the "$foo" argument.'); // ALGO ASSERT + $arguments = $resolver->getArguments($callable); $this->assertNull($arguments); } /** * Tests handleUnresolvedArgument() for missing arguments. * - * * @dataProvider providerTestHandleUnresolvedArgument */ public function testHandleUnresolvedArgument($callable) { $resolver = new ArgumentsResolver([], [], []); - $arguments = $resolver->getArguments($callable); $this->setExpectedException('\RuntimeException', 'requires a value for the "$foo" argument.'); // ALGO ASSERT + $arguments = $resolver->getArguments($callable); $this->assertNull($arguments); } diff --git a/core/tests/Drupal/Tests/Component/Utility/RandomTest.php b/core/tests/Drupal/Tests/Component/Utility/RandomTest.php index 27d188e..9b5a0c0 100644 --- a/core/tests/Drupal/Tests/Component/Utility/RandomTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/RandomTest.php @@ -62,9 +62,9 @@ class RandomTest extends UnitTestCase { // There are fewer than 100 possibilities so an exception should occur to // prevent infinite loops. $random = new Random(); + $this->setExpectedException('\RuntimeException'); // ALGO COVER (body) for ($i = 0; $i <= 100; $i++) { - $this->setExpectedException('\RuntimeException'); // ALGO COVER (body) - $str = $random->name(1, TRUE); + $str = $random->name(1, TRUE); $names[$str] = TRUE; } } @@ -78,9 +78,9 @@ class RandomTest extends UnitTestCase { // There are fewer than 100 possibilities so an exception should occur to // prevent infinite loops. $random = new Random(); + $this->setExpectedException('\RuntimeException'); // ALGO COVER (body) for ($i = 0; $i <= 100; $i++) { - $this->setExpectedException('\RuntimeException'); // ALGO COVER (body) - $str = $random->string(1, TRUE); + $str = $random->string(1, TRUE); $names[$str] = TRUE; } } diff --git a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php index 7b075d4..3f3a3cf 100644 --- a/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php +++ b/core/tests/Drupal/Tests/Core/Asset/LibraryDiscoveryParserTest.php @@ -143,7 +143,6 @@ class LibraryDiscoveryParserTest extends UnitTestCase { /** * Tests that an exception is thrown when a libraries file couldn't be parsed. * - * * @covers ::buildByExtension */ public function testInvalidLibrariesFile() { @@ -163,7 +162,6 @@ class LibraryDiscoveryParserTest extends UnitTestCase { /** * Tests that an exception is thrown when no CSS/JS/setting is specified. * - * * @covers ::buildByExtension */ public function testBuildByExtensionWithMissingInformation() { @@ -275,7 +273,6 @@ class LibraryDiscoveryParserTest extends UnitTestCase { /** * Ensures that you cannot provide positive weights for JavaScript libraries. * - * * @covers ::buildByExtension */ public function testJsWithPositiveWeight() { @@ -402,7 +399,6 @@ class LibraryDiscoveryParserTest extends UnitTestCase { /** * Tests that an exception is thrown when license is missing when 3rd party. * - * * @covers ::buildByExtension */ public function testLibraryThirdPartyWithMissingLicense() { diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php index c85df53..4fa0c6d 100644 --- a/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php @@ -117,7 +117,6 @@ class CacheContextsManagerTest extends UnitTestCase { /** * @covers ::convertTokensToKeys * - * * @dataProvider providerTestInvalidCalculatedContext */ public function testInvalidCalculatedContext($context_token) { diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php index 2c30858..ce63d6c 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php @@ -310,7 +310,6 @@ class EntityFieldManagerTest extends UnitTestCase { * @covers ::getBaseFieldDefinitions * @covers ::buildBaseFieldDefinitions * - * * @dataProvider providerTestGetBaseFieldDefinitionsTranslatableEntityTypeLangcode */ public function testGetBaseFieldDefinitionsTranslatableEntityTypeLangcode($provide_key, $provide_field, $translatable) { diff --git a/core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php b/core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php index 03b2aa6..394adf1 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Sql/DefaultTableMappingTest.php @@ -294,7 +294,6 @@ class DefaultTableMappingTest extends UnitTestCase { * @param string $column * The name of the column to be processed. * - * * @covers ::getFieldColumnName * * @dataProvider providerTestGetFieldColumnName @@ -439,7 +438,6 @@ class DefaultTableMappingTest extends UnitTestCase { /** * Tests DefaultTableMapping::getFieldTableName() with an invalid parameter. * - * * @covers ::getFieldTableName */ public function testGetFieldTableNameInvalid() { diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php index a1bb8db..4db6c4f 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/RedirectResponseSubscriberTest.php @@ -124,7 +124,7 @@ class RedirectResponseSubscriberTest extends UnitTestCase { $listener = new RedirectResponseSubscriber($this->urlAssembler, $this->requestContext); $dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'checkRedirectUrl')); $event = new FilterResponseEvent($kernel, $request, HttpKernelInterface::SUB_REQUEST, $response); - $this->setExpectedException('\PHPUnit_Framework_Error'); // ALGO ASSERT (MANUAL CHIT) + $this->setExpectedException('\PHPUnit_Framework_Error'); // ALGO ASSERT $dispatcher->dispatch(KernelEvents::RESPONSE, $event); $this->assertEquals(400, $event->getResponse()->getStatusCode()); @@ -164,7 +164,6 @@ class RedirectResponseSubscriberTest extends UnitTestCase { } /** - * * @dataProvider providerTestDestinationRedirectWithInvalidUrl */ public function testDestinationRedirectWithInvalidUrl(Request $request) { @@ -175,9 +174,9 @@ class RedirectResponseSubscriberTest extends UnitTestCase { $listener = new RedirectResponseSubscriber($this->urlAssembler, $this->requestContext); $dispatcher->addListener(KernelEvents::RESPONSE, array($listener, 'checkRedirectUrl')); $event = new FilterResponseEvent($kernel, $request, HttpKernelInterface::SUB_REQUEST, $response); + $this->setExpectedException('\PHPUnit_Framework_Error'); // ALGO ASSERT $dispatcher->dispatch(KernelEvents::RESPONSE, $event); - $this->setExpectedException('\PHPUnit_Framework_Error'); // ALGO ASSERT $this->assertEquals(400, $event->getResponse()->getStatusCode()); } diff --git a/core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php b/core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php index 57ac7ed..6aefec2 100644 --- a/core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php +++ b/core/tests/Drupal/Tests/Core/EventSubscriber/SpecialAttributesRouteSubscriberTest.php @@ -89,7 +89,6 @@ class SpecialAttributesRouteSubscriberTest extends UnitTestCase { * The route to check. * * @dataProvider providerTestOnRouteBuildingInvalidVariables - * * @covers ::onAlterRoutes */ public function testOnRouteBuildingInvalidVariables(Route $route) { diff --git a/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php b/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php index 37ff441..6b1f3f6 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php @@ -58,7 +58,7 @@ class FormBuilderTest extends FormTestBase { $clean_form_state = new FormState(); $form_state = new FormState(); - $this->setExpectedException('\InvalidArgumentException', 'The form argument foo is not a valid form.'); // ALGO ASSERT (MANUAL CHIT) + $this->setExpectedException('\InvalidArgumentException', 'The form argument foo is not a valid form.'); // ALGO ASSERT $form_id = $this->formBuilder->getFormId($form_arg, $form_state); $this->assertSame($form_arg, $form_id); @@ -221,8 +221,8 @@ class FormBuilderTest extends FormTestBase { $form_id = 'test_form_id'; $expected_form = $form_id(); - $form = $this->formBuilder->getForm($form_id); $this->setExpectedException('\InvalidArgumentException', 'The form argument test_form_id is not a valid form.'); // ALGO ASSERT + $form = $this->formBuilder->getForm($form_id); $this->assertFormElement($expected_form, $form, 'test'); $this->assertSame('test-form-id', $form['#id']); } @@ -263,8 +263,8 @@ class FormBuilderTest extends FormTestBase { $form_id = 'test_form_id'; $expected_form = $form_id(); - $form = $this->formBuilder->getForm($form_id); $this->setExpectedException('\InvalidArgumentException', 'The form argument test_form_id is not a valid form.'); // ALGO ASSERT + $form = $this->formBuilder->getForm($form_id); $this->assertFormElement($expected_form, $form, 'test'); $this->assertArrayHasKey('#id', $form); } diff --git a/core/tests/Drupal/Tests/Core/Form/SubformStateTest.php b/core/tests/Drupal/Tests/Core/Form/SubformStateTest.php index 8503a8a..1502e33 100644 --- a/core/tests/Drupal/Tests/Core/Form/SubformStateTest.php +++ b/core/tests/Drupal/Tests/Core/Form/SubformStateTest.php @@ -97,7 +97,6 @@ class SubformStateTest extends UnitTestCase { * * @dataProvider providerGetValuesBroken * - * * @param string[] $parents * @param string $expected */ diff --git a/core/tests/Drupal/Tests/Core/Routing/AccessAwareRouterTest.php b/core/tests/Drupal/Tests/Core/Routing/AccessAwareRouterTest.php index 8016fcc..c55ef4c 100644 --- a/core/tests/Drupal/Tests/Core/Routing/AccessAwareRouterTest.php +++ b/core/tests/Drupal/Tests/Core/Routing/AccessAwareRouterTest.php @@ -96,7 +96,7 @@ class AccessAwareRouterTest extends UnitTestCase { ->method('checkRequest') ->with($request) ->willReturn($access_result); - $this->setExpectedException('\Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException'); // ALGO ASSERT (MANUAL CHIT) + $this->setExpectedException('\Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException'); // ALGO ASSERT $parameters = $this->router->matchRequest($request); $expected = [ AccessAwareRouterInterface::ACCESS_RESULT => $access_result, diff --git a/core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php b/core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php index ec350d2..4172def 100644 --- a/core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php +++ b/core/tests/Drupal/Tests/Core/StringTranslation/TranslatableMarkupTest.php @@ -82,7 +82,6 @@ class TranslatableMarkupTest extends UnitTestCase { } /** - * * @covers ::__construct */ public function testIsStringAssertion() { @@ -92,7 +91,6 @@ class TranslatableMarkupTest extends UnitTestCase { } /** - * * @covers ::__construct */ public function testIsStringAssertionWithFormattableMarkup() { diff --git a/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php b/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php index 4e87899..12e27a4 100644 --- a/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php +++ b/core/tests/Drupal/Tests/Core/UnroutedUrlTest.php @@ -178,7 +178,6 @@ class UnroutedUrlTest extends UnitTestCase { * @depends testFromUri * @dataProvider providerFromUri * - * * @covers ::getRouteName */ public function testGetRouteName($uri) { @@ -193,7 +192,6 @@ class UnroutedUrlTest extends UnitTestCase { * @depends testFromUri * @dataProvider providerFromUri * - * * @covers ::getRouteParameters */ public function testGetRouteParameters($uri) { diff --git a/core/tests/Drupal/Tests/Core/UrlTest.php b/core/tests/Drupal/Tests/Core/UrlTest.php index 484047c..92785f4 100644 --- a/core/tests/Drupal/Tests/Core/UrlTest.php +++ b/core/tests/Drupal/Tests/Core/UrlTest.php @@ -314,7 +314,6 @@ class UrlTest extends UnitTestCase { * * @depends testUrlFromRequest * - * * @covers ::getUri */ public function testGetUriForInternalUrl($urls) {