diff --git a/core/modules/aggregator/tests/src/Unit/Menu/AggregatorLocalTasksTest.php b/core/modules/aggregator/tests/src/Unit/Menu/AggregatorLocalTasksTest.php index f2dd7b4..e974981 100644 --- a/core/modules/aggregator/tests/src/Unit/Menu/AggregatorLocalTasksTest.php +++ b/core/modules/aggregator/tests/src/Unit/Menu/AggregatorLocalTasksTest.php @@ -27,7 +27,7 @@ protected function setUp() { /** * Tests local task existence. * - * @dataProvider getAggregatorAdminRoutes + * @dataProvider providerAggregatorAdminRoutes */ public function testAggregatorAdminLocalTasks($route) { $this->assertLocalTasks($route, array( @@ -38,7 +38,7 @@ public function testAggregatorAdminLocalTasks($route) { /** * Provides a list of routes to test. */ - public function getAggregatorAdminRoutes() { + public function providerAggregatorAdminRoutes() { return array( array('aggregator.admin_overview'), array('aggregator.admin_settings'), @@ -48,7 +48,7 @@ public function getAggregatorAdminRoutes() { /** * Checks aggregator source tasks. * - * @dataProvider getAggregatorSourceRoutes + * @dataProvider providerAggregatorSourceRoutes */ public function testAggregatorSourceLocalTasks($route) { $this->assertLocalTasks($route, array( @@ -60,7 +60,7 @@ public function testAggregatorSourceLocalTasks($route) { /** * Provides a list of source routes to test. */ - public function getAggregatorSourceRoutes() { + public function providerAggregatorSourceRoutes() { return array( array('entity.aggregator_feed.canonical'), array('entity.aggregator_feed.edit_form'), diff --git a/core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php b/core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php index 9c01796..62f6f35 100644 --- a/core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php +++ b/core/modules/block_content/tests/src/Unit/Menu/BlockContentLocalTasksTest.php @@ -58,7 +58,7 @@ protected function setUp() { /** * Checks block_content listing local tasks. * - * @dataProvider getBlockContentListingRoutes + * @dataProvider providerBlockContentListingRoutes */ public function testBlockContentListLocalTasks($route) { $this->assertLocalTasks($route, array( @@ -76,7 +76,7 @@ public function testBlockContentListLocalTasks($route) { /** * Provides a list of routes to test. */ - public function getBlockContentListingRoutes() { + public function providerBlockContentListingRoutes() { return array( array('entity.block_content.collection', 'entity.block_content_type.collection'), ); diff --git a/core/modules/book/tests/src/Unit/Menu/BookLocalTasksTest.php b/core/modules/book/tests/src/Unit/Menu/BookLocalTasksTest.php index d45929b..2c4468a 100644 --- a/core/modules/book/tests/src/Unit/Menu/BookLocalTasksTest.php +++ b/core/modules/book/tests/src/Unit/Menu/BookLocalTasksTest.php @@ -27,7 +27,7 @@ protected function setUp() { /** * Tests local task existence. * - * @dataProvider getBookAdminRoutes + * @dataProvider providerBookAdminRoutes */ public function testBookAdminLocalTasks($route) { @@ -39,7 +39,7 @@ public function testBookAdminLocalTasks($route) { /** * Provides a list of routes to test. */ - public function getBookAdminRoutes() { + public function providerBookAdminRoutes() { return array( array('book.admin'), array('book.settings'), @@ -49,7 +49,7 @@ public function getBookAdminRoutes() { /** * Tests local task existence. * - * @dataProvider getBookNodeRoutes + * @dataProvider providerBookNodeRoutes */ public function testBookNodeLocalTasks($route) { $this->assertLocalTasks($route, array( @@ -60,7 +60,7 @@ public function testBookNodeLocalTasks($route) { /** * Provides a list of routes to test. */ - public function getBookNodeRoutes() { + public function providerBookNodeRoutes() { return array( array('entity.node.canonical'), array('entity.node.book_outline_form'), diff --git a/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php b/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php index 26edb8e..d8a8a1d 100644 --- a/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php +++ b/core/modules/comment/tests/src/Unit/CommentLinkBuilderTest.php @@ -110,7 +110,7 @@ protected function setUp() { * Array of expected links keyed by link ID. Can be either string (link * title) or array of link properties. * - * @dataProvider getLinkCombinations + * @dataProvider providerLinkCombinations * * @covers ::buildCommentedEntityLinks */ @@ -159,7 +159,7 @@ public function testCommentLinkBuilder(NodeInterface $node, $context, $has_acces /** * Data provider for ::testCommentLinkBuilder. */ - public function getLinkCombinations() { + public function providerLinkCombinations() { $cases = array(); // No links should be created if the entity doesn't have the field. $cases[] = array( diff --git a/core/modules/config/tests/src/Unit/Menu/ConfigLocalTasksTest.php b/core/modules/config/tests/src/Unit/Menu/ConfigLocalTasksTest.php index e36435b..26cc38d 100644 --- a/core/modules/config/tests/src/Unit/Menu/ConfigLocalTasksTest.php +++ b/core/modules/config/tests/src/Unit/Menu/ConfigLocalTasksTest.php @@ -24,7 +24,7 @@ protected function setUp() { /** * Tests config local tasks existence. * - * @dataProvider getConfigAdminRoutes + * @dataProvider providerConfigAdminRoutes */ public function testConfigAdminLocalTasks($route, $expected) { $this->assertLocalTasks($route, $expected); @@ -33,7 +33,7 @@ public function testConfigAdminLocalTasks($route, $expected) { /** * Provides a list of routes to test. */ - public function getConfigAdminRoutes() { + public function providerConfigAdminRoutes() { return array( array('config.sync', array(array('config.sync', 'config.import', 'config.export'))), array('config.import_full', array(array('config.sync', 'config.import', 'config.export'), array('config.import_full', 'config.import_single'))), diff --git a/core/modules/contact/tests/src/Unit/MailHandlerTest.php b/core/modules/contact/tests/src/Unit/MailHandlerTest.php index 61634f9..41f7f31 100644 --- a/core/modules/contact/tests/src/Unit/MailHandlerTest.php +++ b/core/modules/contact/tests/src/Unit/MailHandlerTest.php @@ -132,7 +132,7 @@ public function testInvalidRecipient() { /** * Tests the sendMailMessages method. * - * @dataProvider getSendMailMessages + * @dataProvider providerSendMailMessages * * @covers ::sendMailMessages */ @@ -160,7 +160,7 @@ function($module, $key, $to, $langcode, $params, $from) use (&$results) { /** * Data provider for ::testSendMailMessages. */ - public function getSendMailMessages() { + public function providerSendMailMessages() { $data = array(); $recipients = array('admin@drupal.org', 'user@drupal.org'); $default_result = array( diff --git a/core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php b/core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php index 572e328..4b3ed64 100644 --- a/core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php +++ b/core/modules/language/tests/src/Unit/Menu/LanguageLocalTasksTest.php @@ -26,7 +26,7 @@ protected function setUp() { /** * Tests language admin overview local tasks existence. * - * @dataProvider getLanguageAdminOverviewRoutes + * @dataProvider providerLanguageAdminOverviewRoutes */ public function testLanguageAdminLocalTasks($route, $expected) { $this->assertLocalTasks($route, $expected); @@ -35,7 +35,7 @@ public function testLanguageAdminLocalTasks($route, $expected) { /** * Provides a list of routes to test. */ - public function getLanguageAdminOverviewRoutes() { + public function providerLanguageAdminOverviewRoutes() { return array( array('entity.configurable_language.collection', array(array('entity.configurable_language.collection', 'language.negotiation'))), array('language.negotiation', array(array('entity.configurable_language.collection', 'language.negotiation'))), diff --git a/core/modules/locale/tests/src/Unit/LocaleLookupTest.php b/core/modules/locale/tests/src/Unit/LocaleLookupTest.php index a650840..b54c69a 100644 --- a/core/modules/locale/tests/src/Unit/LocaleLookupTest.php +++ b/core/modules/locale/tests/src/Unit/LocaleLookupTest.php @@ -134,7 +134,7 @@ public function testResolveCacheMissWithoutFallback() { * * @covers ::resolveCacheMiss * - * @dataProvider resolveCacheMissWithFallbackProvider + * @dataProvider providerResolveCacheMissWithFallback */ public function testResolveCacheMissWithFallback($langcode, $string, $context, $expected) { // These are fake words! @@ -192,7 +192,7 @@ public function testResolveCacheMissWithFallback($langcode, $string, $context, $ /** * Provides test data for testResolveCacheMissWithFallback(). */ - public function resolveCacheMissWithFallbackProvider() { + public function providerResolveCacheMissWithFallback() { return array( array('cs', 'test', 'irrelevant', 'test v české'), array('cs', 'fake', 'irrelevant', 'falešný'), diff --git a/core/modules/locale/tests/src/Unit/Menu/LocaleLocalTasksTest.php b/core/modules/locale/tests/src/Unit/Menu/LocaleLocalTasksTest.php index 1c3d748..963bedc 100644 --- a/core/modules/locale/tests/src/Unit/Menu/LocaleLocalTasksTest.php +++ b/core/modules/locale/tests/src/Unit/Menu/LocaleLocalTasksTest.php @@ -29,7 +29,7 @@ protected function setUp() { /** * Checks locale listing local tasks. * - * @dataProvider getLocalePageRoutes + * @dataProvider providerLocalePageRoutes */ public function testLocalePageLocalTasks($route) { $tasks = array( @@ -41,7 +41,7 @@ public function testLocalePageLocalTasks($route) { /** * Provides a list of routes to test. */ - public function getLocalePageRoutes() { + public function providerLocalePageRoutes() { return array( array('locale.translate_page'), array('locale.translate_import'), diff --git a/core/modules/migrate/tests/src/Unit/Exception/RequirementsExceptionTest.php b/core/modules/migrate/tests/src/Unit/Exception/RequirementsExceptionTest.php index 05e81e1..78cdc29 100644 --- a/core/modules/migrate/tests/src/Unit/Exception/RequirementsExceptionTest.php +++ b/core/modules/migrate/tests/src/Unit/Exception/RequirementsExceptionTest.php @@ -28,7 +28,7 @@ public function testGetRequirements() { /** * @covers ::getRequirementsString - * @dataProvider getRequirementsProvider + * @dataProvider providerGetRequirements */ public function testGetExceptionString($expected, $message, $requirements) { $exception = new RequirementsException($message, $requirements); @@ -38,7 +38,7 @@ public function testGetExceptionString($expected, $message, $requirements) { /** * Provides a list of requirements to test. */ - public function getRequirementsProvider() { + public function providerGetRequirements() { return array( array( 'requirements: random_jackson_pivot.', diff --git a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php index 0b61f30..c796e33 100644 --- a/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php +++ b/core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php @@ -352,7 +352,7 @@ public function testGetRowBySource() { * - Single-value source ID to multi-value destination ID. * - Multi-value source ID to single-value destination ID. */ - public function lookupDestinationIdMappingDataProvider() { + public function providerLookupDestinationIdMappingData() { return [ [1, 1], [2, 2], @@ -368,7 +368,7 @@ public function lookupDestinationIdMappingDataProvider() { * Number of source fields to test. * @param int $num_destination_fields * Number of destination fields to test. - * @dataProvider lookupDestinationIdMappingDataProvider + * @dataProvider providerLookupDestinationIdMappingData */ public function testLookupDestinationIdMapping($num_source_fields, $num_destination_fields) { // Adjust the migration configuration according to the number of source and @@ -436,7 +436,7 @@ public function testGetRowByDestination() { * - Single-value destination ID to multi-value source ID. * - Multi-value destination ID to single-value source ID. */ - public function lookupSourceIDMappingDataProvider() { + public function providerLookupSourceIDMappingData() { return [ [1, 1], [2, 2], @@ -452,7 +452,7 @@ public function lookupSourceIDMappingDataProvider() { * Number of source fields to test. * @param int $num_destination_fields * Number of destination fields to test. - * @dataProvider lookupSourceIDMappingDataProvider + * @dataProvider providerLookupSourceIDMappingData */ public function testLookupSourceIDMapping($num_source_fields, $num_destination_fields) { // Adjust the migration configuration according to the number of source and @@ -557,7 +557,7 @@ public function testProcessedCount() { * - One update. * - Multiple updates. */ - public function updateCountDataProvider() { + public function providerUpdateCountData() { return [ [0], [1], @@ -570,7 +570,7 @@ public function updateCountDataProvider() { * * @param int $num_update_rows * The number of update rows to test. - * @dataProvider updateCountDataProvider + * @dataProvider providerUpdateCountData */ public function testUpdateCount($num_update_rows) { for ($i = 0; $i < 5; $i++) { @@ -599,7 +599,7 @@ public function testUpdateCount($num_update_rows) { * - One error. * - Multiple errors. */ - public function errorCountDataProvider() { + public function providerErrorCountData() { return [ [0], [1], @@ -612,7 +612,7 @@ public function errorCountDataProvider() { * * @param int $num_error_rows * Number of error rows to test. - * @dataProvider errorCountDataProvider + * @dataProvider providerErrorCountData */ public function testErrorCount($num_error_rows) { for ($i = 0; $i < 5; $i++) { diff --git a/core/modules/migrate/tests/src/Unit/SqlBaseTest.php b/core/modules/migrate/tests/src/Unit/SqlBaseTest.php index caa6e3d..ae1011b 100644 --- a/core/modules/migrate/tests/src/Unit/SqlBaseTest.php +++ b/core/modules/migrate/tests/src/Unit/SqlBaseTest.php @@ -29,7 +29,7 @@ class SqlBaseTest extends UnitTestCase { * @param array $idmap_options * An array of connection options for the id map connection. * - * @dataProvider sqlBaseTestProvider + * @dataProvider providerSqlBaseTest */ public function testMapJoinable($expected_result, $id_map_is_sql, $with_id_map, $source_options = [], $idmap_options = []) { // Setup a connection object. @@ -83,7 +83,7 @@ public function testMapJoinable($expected_result, $id_map_is_sql, $with_id_map, * @return array * An array of data per test run. */ - public function sqlBaseTestProvider() { + public function providerSqlBaseTest() { return [ // Source ids are empty so mapJoinable() is false. [FALSE, FALSE, FALSE], diff --git a/core/modules/node/src/Tests/Migrate/d7/MigrateNodeTypeTest.php b/core/modules/node/src/Tests/Migrate/d7/MigrateNodeTypeTest.php index c3706a9..4ac5e11 100644 --- a/core/modules/node/src/Tests/Migrate/d7/MigrateNodeTypeTest.php +++ b/core/modules/node/src/Tests/Migrate/d7/MigrateNodeTypeTest.php @@ -39,7 +39,6 @@ protected function setUp() { /** * Tests a single node type. * - * @dataProvider testNodeTypeDataProvider * @param string $id * The node type ID. * @param string $label diff --git a/core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php b/core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php index b3d3ed9..cfbd630 100644 --- a/core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php +++ b/core/modules/shortcut/tests/src/Unit/Menu/ShortcutLocalTasksTest.php @@ -27,7 +27,7 @@ protected function setUp() { /** * Checks shortcut listing local tasks. * - * @dataProvider getShortcutPageRoutes + * @dataProvider providerShortcutPageRoutes */ public function testShortcutPageLocalTasks($route) { $tasks = array( @@ -39,7 +39,7 @@ public function testShortcutPageLocalTasks($route) { /** * Provides a list of routes to test. */ - public function getShortcutPageRoutes() { + public function providerShortcutPageRoutes() { return array( array('entity.user.canonical'), array('entity.user.edit_form'), diff --git a/core/modules/simpletest/tests/src/Unit/TestBaseTest.php b/core/modules/simpletest/tests/src/Unit/TestBaseTest.php index bc2f2fe..8810bce 100644 --- a/core/modules/simpletest/tests/src/Unit/TestBaseTest.php +++ b/core/modules/simpletest/tests/src/Unit/TestBaseTest.php @@ -10,6 +10,15 @@ use Drupal\Tests\UnitTestCase; /** + * Tests the random strings validation rules. + * + * @param string $string + * The string to validate. + * @param bool $expected + * The expected result of the validation. + * + * @see \Drupal\simpletest\TestBase::randomStringValidate(). + * * @coversDefaultClass \Drupal\simpletest\TestBase * @group simpletest */ diff --git a/core/modules/simpletest/tests/src/Unit/TestInfoParsingTest.php b/core/modules/simpletest/tests/src/Unit/TestInfoParsingTest.php index d527996..2eecc63 100644 --- a/core/modules/simpletest/tests/src/Unit/TestInfoParsingTest.php +++ b/core/modules/simpletest/tests/src/Unit/TestInfoParsingTest.php @@ -17,14 +17,14 @@ class TestInfoParsingTest extends UnitTestCase { /** * @covers ::getTestInfo - * @dataProvider infoParserProvider + * @dataProvider providerTestInfoParser */ public function testTestInfoParser($expected, $classname, $doc_comment = NULL) { $info = \Drupal\simpletest\TestDiscovery::getTestInfo($classname, $doc_comment); $this->assertEquals($expected, $info); } - public function infoParserProvider() { + public function providerTestInfoParser() { // A module provided unit test. $tests[] = [ // Expected result. diff --git a/core/modules/system/tests/src/Unit/Menu/SystemLocalTasksTest.php b/core/modules/system/tests/src/Unit/Menu/SystemLocalTasksTest.php index 802f5ef..e68a13b 100644 --- a/core/modules/system/tests/src/Unit/Menu/SystemLocalTasksTest.php +++ b/core/modules/system/tests/src/Unit/Menu/SystemLocalTasksTest.php @@ -50,7 +50,7 @@ protected function setUp() { /** * Tests local task existence. * - * @dataProvider getSystemAdminRoutes + * @dataProvider providerSystemAdminRoutes */ public function testSystemAdminLocalTasks($route, $expected) { $this->assertLocalTasks($route, $expected); @@ -59,7 +59,7 @@ public function testSystemAdminLocalTasks($route, $expected) { /** * Provides a list of routes to test. */ - public function getSystemAdminRoutes() { + public function providerSystemAdminRoutes() { return array( array('system.admin_content', array(array('system.admin_content'))), array('system.theme_settings_theme', array( diff --git a/core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php b/core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php index 490e7e8..3145dea 100644 --- a/core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php +++ b/core/modules/taxonomy/tests/src/Unit/Menu/TaxonomyLocalTasksTest.php @@ -24,7 +24,7 @@ protected function setUp() { /** * Checks taxonomy edit local tasks. * - * @dataProvider getTaxonomyPageRoutes + * @dataProvider providerTaxonomyPageRoutes */ public function testTaxonomyPageLocalTasks($route, $subtask = array()) { $tasks = array( @@ -37,7 +37,7 @@ public function testTaxonomyPageLocalTasks($route, $subtask = array()) { /** * Provides a list of routes to test. */ - public function getTaxonomyPageRoutes() { + public function providerTaxonomyPageRoutes() { return array( array('entity.taxonomy_term.canonical'), array('entity.taxonomy_term.edit_form'), diff --git a/core/modules/tour/tests/src/Unit/Entity/TourTest.php b/core/modules/tour/tests/src/Unit/Entity/TourTest.php index a6625c8..e9a8700 100644 --- a/core/modules/tour/tests/src/Unit/Entity/TourTest.php +++ b/core/modules/tour/tests/src/Unit/Entity/TourTest.php @@ -28,7 +28,7 @@ class TourTest extends UnitTestCase { * * @covers ::hasMatchingRoute * - * @dataProvider routeProvider + * @dataProvider providerRoute */ public function testHasMatchingRoute($routes, $route_name, $route_params, $result) { $tour = $this->getMockBuilder('\Drupal\tour\Entity\Tour') @@ -45,10 +45,10 @@ public function testHasMatchingRoute($routes, $route_name, $route_params, $resul $tour->resetKeyedRoutes(); } - /* + /** * Provides sample routes for testing. */ - public function routeProvider() { + public function providerRoute() { return array( // Simple match. array( diff --git a/core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php b/core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php index 7c1e17c..8e2f66f 100644 --- a/core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php +++ b/core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php @@ -24,7 +24,7 @@ protected function setUp() { /** * Checks update report tasks. * - * @dataProvider getUpdateReportRoutes + * @dataProvider providerUpdateReportRoutes */ public function testUpdateReportLocalTasks($route) { $this->assertLocalTasks($route, array( @@ -35,7 +35,7 @@ public function testUpdateReportLocalTasks($route) { /** * Provides a list of report routes to test. */ - public function getUpdateReportRoutes() { + public function providerUpdateReportRoutes() { return array( array('update.status'), array('update.settings'), @@ -46,7 +46,7 @@ public function getUpdateReportRoutes() { /** * Checks update module tasks. * - * @dataProvider getUpdateModuleRoutes + * @dataProvider providerUpdateModuleRoutes */ public function testUpdateModuleLocalTasks($route) { $this->assertLocalTasks($route, array( @@ -58,7 +58,7 @@ public function testUpdateModuleLocalTasks($route) { /** * Provides a list of module routes to test. */ - public function getUpdateModuleRoutes() { + public function providerUpdateModuleRoutes() { return array( array('update.module_update'), ); @@ -67,7 +67,7 @@ public function getUpdateModuleRoutes() { /** * Checks update theme tasks. * - * @dataProvider getUpdateThemeRoutes + * @dataProvider providerUpdateThemeRoutes */ public function testUpdateThemeLocalTasks($route) { $this->assertLocalTasks($route, array( @@ -79,7 +79,7 @@ public function testUpdateThemeLocalTasks($route) { /** * Provides a list of theme routes to test. */ - public function getUpdateThemeRoutes() { + public function providerUpdateThemeRoutes() { return array( array('update.theme_update'), ); diff --git a/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php b/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php index 8b8abf5..61a0f2b 100644 --- a/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php +++ b/core/modules/user/tests/src/Unit/Menu/UserLocalTasksTest.php @@ -24,7 +24,7 @@ protected function setUp() { /** * Tests local task existence. * - * @dataProvider getUserAdminRoutes + * @dataProvider providerUserAdminRoutes */ public function testUserAdminLocalTasks($route, $expected) { $this->assertLocalTasks($route, $expected); @@ -33,7 +33,7 @@ public function testUserAdminLocalTasks($route, $expected) { /** * Provides a list of routes to test. */ - public function getUserAdminRoutes() { + public function providerUserAdminRoutes() { return array( array('entity.user.collection', array(array('entity.user.collection', 'user.admin_permissions', 'entity.user_role.collection'))), array('user.admin_permissions', array(array('entity.user.collection', 'user.admin_permissions', 'entity.user_role.collection'))), @@ -45,7 +45,7 @@ public function getUserAdminRoutes() { /** * Checks user listing local tasks. * - * @dataProvider getUserLoginRoutes + * @dataProvider providerUserLoginRoutes */ public function testUserLoginLocalTasks($route) { $tasks = array( @@ -57,7 +57,7 @@ public function testUserLoginLocalTasks($route) { /** * Provides a list of routes to test. */ - public function getUserLoginRoutes() { + public function providerUserLoginRoutes() { return array( array('user.login'), array('user.register'), @@ -68,7 +68,7 @@ public function getUserLoginRoutes() { /** * Checks user listing local tasks. * - * @dataProvider getUserPageRoutes + * @dataProvider providerUserPageRoutes */ public function testUserPageLocalTasks($route, $subtask = array()) { $tasks = array( @@ -81,7 +81,7 @@ public function testUserPageLocalTasks($route, $subtask = array()) { /** * Provides a list of routes to test. */ - public function getUserPageRoutes() { + public function providerUserPageRoutes() { return array( array('entity.user.canonical'), array('entity.user.edit_form'), diff --git a/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php b/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php index 26bd3a9..c235c13 100644 --- a/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php +++ b/core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php @@ -143,7 +143,7 @@ public function assertFieldAccess($field, $viewer, $target, $view, $edit) { /** * Ensures user name access is working properly. * - * @dataProvider userNameProvider + * @dataProvider providerUserName */ public function testUserNameAccess($viewer, $target, $view, $edit) { $this->assertFieldAccess('name', $viewer, $target, $view, $edit); @@ -152,7 +152,7 @@ public function testUserNameAccess($viewer, $target, $view, $edit) { /** * Provides test data for estUserNameAccess(). */ - public function userNameProvider() { + public function providerUserName() { $name_access = array( // The viewer user is allowed to see user names on all accounts. array( @@ -194,7 +194,7 @@ public function userNameProvider() { /** * Tests that private user settings cannot be viewed by other users. * - * @dataProvider hiddenUserSettingsProvider + * @dataProvider providerHiddenUserSettings */ public function testHiddenUserSettings($field, $viewer, $target, $view, $edit) { $this->assertFieldAccess($field, $viewer, $target, $view, $edit); @@ -203,7 +203,7 @@ public function testHiddenUserSettings($field, $viewer, $target, $view, $edit) { /** * Provides test data for testHiddenUserSettings(). */ - public function hiddenUserSettingsProvider() { + public function providerHiddenUserSettings() { $access_info = array(); $fields = array( @@ -253,7 +253,7 @@ public function hiddenUserSettingsProvider() { /** * Tests that private user settings cannot be viewed by other users. * - * @dataProvider adminFieldAccessProvider + * @dataProvider providerAdminFieldAccess */ public function testAdminFieldAccess($field, $viewer, $target, $view, $edit) { $this->assertFieldAccess($field, $viewer, $target, $view, $edit); @@ -262,7 +262,7 @@ public function testAdminFieldAccess($field, $viewer, $target, $view, $edit) { /** * Provides test data for testAdminFieldAccess(). */ - public function adminFieldAccessProvider() { + public function providerAdminFieldAccess() { $access_info = array(); $fields = array( @@ -303,7 +303,7 @@ public function adminFieldAccessProvider() { /** * Tests that passwords cannot be viewed, just edited. * - * @dataProvider passwordAccessProvider + * @dataProvider providerPasswordAccess */ public function testPasswordAccess($viewer, $target, $view, $edit) { $this->assertFieldAccess('pass', $viewer, $target, $view, $edit); @@ -312,7 +312,7 @@ public function testPasswordAccess($viewer, $target, $view, $edit) { /** * Provides test data for passwordAccessProvider(). */ - public function passwordAccessProvider() { + public function providerPasswordAccess() { $pass_access = array( array( 'viewer' => 'viewer', @@ -348,7 +348,7 @@ public function passwordAccessProvider() { /** * Tests the user created field access. * - * @dataProvider createdAccessProvider + * @dataProvider providerCreatedAccess */ public function testCreatedAccess($viewer, $target, $view, $edit) { $this->assertFieldAccess('created', $viewer, $target, $view, $edit); @@ -357,7 +357,7 @@ public function testCreatedAccess($viewer, $target, $view, $edit) { /** * Provides test data for testCreatedAccess(). */ - public function createdAccessProvider() { + public function providerCreatedAccess() { $created_access = array( array( 'viewer' => 'viewer', @@ -384,7 +384,7 @@ public function createdAccessProvider() { /** * Tests access to a non-existing base field. * - * @dataProvider NonExistingFieldAccessProvider + * @dataProvider providerNonExistingFieldAccess */ public function testNonExistingFieldAccess($viewer, $target, $view, $edit) { // By default everyone has access to all fields that do not have explicit @@ -396,7 +396,7 @@ public function testNonExistingFieldAccess($viewer, $target, $view, $edit) { /** * Provides test data for testNonExistingFieldAccess(). */ - public function NonExistingFieldAccessProvider() { + public function providerNonExistingFieldAccess() { $created_access = array( array( 'viewer' => 'viewer', diff --git a/core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php b/core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php index 9a8db88..b8b5e7f 100644 --- a/core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php +++ b/core/tests/Drupal/Tests/Component/Bridge/ZfExtensionManagerSfContainerTest.php @@ -65,7 +65,7 @@ public function testPrefix() { /** * @covers ::canonicalizeName - * @dataProvider canonicalizeNameProvider + * @dataProvider providerCanonicalizeName */ public function testCanonicalizeName($name, $canonical_name) { $service = new \stdClass(); @@ -84,7 +84,7 @@ public function testCanonicalizeName($name, $canonical_name) { * Replacements: * array('-' => '', '_' => '', ' ' => '', '\\' => '', '/' => '') */ - public function canonicalizeNameProvider() { + public function providerCanonicalizeName() { return array( array( 'foobar', diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php index 21f6f5f..27174df 100644 --- a/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php +++ b/core/tests/Drupal/Tests/Component/DependencyInjection/ContainerTest.php @@ -663,7 +663,7 @@ public function testInitializedForAliases() { * * @expectedException \BadMethodCallException * - * @dataProvider scopeExceptionTestProvider + * @dataProvider providerScopeExceptionTest */ public function testScopeFunctionsWithException($method, $argument) { $callable = array( @@ -675,14 +675,14 @@ public function testScopeFunctionsWithException($method, $argument) { } /** - * Data provider for scopeExceptionTestProvider(). + * Data provider for testScopeFunctionsWithException(). * * @return array[] * Returns per data set an array with: * - method name to call * - argument to pass */ - public function scopeExceptionTestProvider() { + public function providerScopeExceptionTest() { $scope = $this->prophesize('\Symfony\Component\DependencyInjection\ScopeInterface')->reveal(); return array( array('enterScope', 'test_scope'), diff --git a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php index ca9a2e4..6cb7472 100644 --- a/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php +++ b/core/tests/Drupal/Tests/Component/DependencyInjection/Dumper/OptimizedPhpArrayDumperTest.php @@ -96,7 +96,7 @@ public function testDumpForEmptyContainer() { * * @covers ::getAliases * - * @dataProvider getAliasesDataProvider + * @dataProvider providerGetAliasesData */ public function testGetAliases($aliases, $definition_aliases) { $this->containerDefinition['aliases'] = $definition_aliases; @@ -112,7 +112,7 @@ public function testGetAliases($aliases, $definition_aliases) { * - aliases as returned by ContainerBuilder. * - aliases as expected in the container definition. */ - public function getAliasesDataProvider() { + public function providerGetAliasesData() { return array( array(array(), array()), array( @@ -135,7 +135,7 @@ public function getAliasesDataProvider() { * @covers ::dumpValue * @covers ::getReferenceCall * - * @dataProvider getParametersDataProvider + * @dataProvider providerGetParametersData */ public function testGetParameters($parameters, $definition_parameters, $is_frozen) { $this->containerDefinition['parameters'] = $definition_parameters; @@ -162,7 +162,7 @@ public function testGetParameters($parameters, $definition_parameters, $is_froze * - parameters as expected in the container definition. * - frozen value */ - public function getParametersDataProvider() { + public function providerGetParametersData() { return array( array(array(), array(), TRUE), array( @@ -207,7 +207,7 @@ public function getParametersDataProvider() { * @covers ::getServiceCall * @covers ::getParameterCall * - * @dataProvider getDefinitionsDataProvider + * @dataProvider providerGetDefinitionsData */ public function testGetServiceDefinitions($services, $definition_services) { $this->containerDefinition['services'] = $definition_services; @@ -234,7 +234,7 @@ public function testGetServiceDefinitions($services, $definition_services) { * - parameters as expected in the container definition. * - frozen value */ - public function getDefinitionsDataProvider() { + public function providerGetDefinitionsData() { $base_service_definition = array( 'class' => '\stdClass', 'public' => TRUE, diff --git a/core/tests/Drupal/Tests/Core/Access/AccessResultTest.php b/core/tests/Drupal/Tests/Core/Access/AccessResultTest.php index 2c46a0b..2e2e4fd 100644 --- a/core/tests/Drupal/Tests/Core/Access/AccessResultTest.php +++ b/core/tests/Drupal/Tests/Core/Access/AccessResultTest.php @@ -519,7 +519,7 @@ public function testInheritCacheability() { * does not implement CacheableDependencyInterface, then the result won't * either. This is the case for bullets 3, 6 and 9 in the set above. */ - public function andOrCacheabilityPropagationProvider() { + public function providerAndOrCacheabilityPropagation() { // ct: cacheable=true, cf: cacheable=false, un: uncacheable. // Note: the test cases that have a "un" access result as the first operand // test UncacheableTestAccessResult, not AccessResult. However, we @@ -792,7 +792,7 @@ public function andOrCacheabilityPropagationProvider() { * @covers ::orIf * @covers ::inheritCacheability * - * @dataProvider andOrCacheabilityPropagationProvider + * @dataProvider providerAndOrCacheabilityPropagation */ public function testAndOrCacheabilityPropagation(AccessResultInterface $first, $op, AccessResultInterface $second, $implements_cacheable_dependency_interface, $is_cacheable) { if ($op === 'OR') { diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheTest.php index 5c84745..636cc7c 100644 --- a/core/tests/Drupal/Tests/Core/Cache/CacheTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/CacheTest.php @@ -21,7 +21,7 @@ class CacheTest extends UnitTestCase { * * @return array */ - public function validateTagsProvider() { + public function providerValidateTags() { return [ [[], FALSE], [['foo'], FALSE], @@ -48,7 +48,7 @@ public function validateTagsProvider() { /** * @covers ::validateTags * - * @dataProvider validateTagsProvider + * @dataProvider providerValidateTags */ public function testValidateTags(array $tags, $expected_exception_message) { if ($expected_exception_message !== FALSE) { @@ -64,7 +64,7 @@ public function testValidateTags(array $tags, $expected_exception_message) { * * @return array */ - public function mergeTagsProvider() { + public function providerMergeTags() { return [ [[], [], []], [['bar'], ['foo'], ['bar', 'foo']], @@ -79,7 +79,7 @@ public function mergeTagsProvider() { /** * @covers ::mergeTags * - * @dataProvider mergeTagsProvider + * @dataProvider providerMergeTags */ public function testMergeTags(array $a, array $b, array $expected) { $this->assertEquals($expected, Cache::mergeTags($a, $b)); @@ -90,7 +90,7 @@ public function testMergeTags(array $a, array $b, array $expected) { * * @return array */ - public function mergeMaxAgesProvider() { + public function providerMergeMaxAges() { return [ [Cache::PERMANENT, Cache::PERMANENT, Cache::PERMANENT], [60, 60, 60], @@ -111,7 +111,7 @@ public function mergeMaxAgesProvider() { /** * @covers ::mergeMaxAges * - * @dataProvider mergeMaxAgesProvider + * @dataProvider providerMergeMaxAges */ public function testMergeMaxAges($a, $b, $expected) { $this->assertSame($expected, Cache::mergeMaxAges($a, $b)); @@ -122,7 +122,7 @@ public function testMergeMaxAges($a, $b, $expected) { * * @return array */ - public function buildTagsProvider() { + public function providerBuildTags() { return [ ['node', [1], ['node:1']], ['node', [1, 2, 3], ['node:1', 'node:2', 'node:3']], @@ -147,7 +147,7 @@ public function buildTagsProvider() { /** * @covers ::buildTags * - * @dataProvider buildTagsProvider + * @dataProvider providerBuildTags */ public function testBuildTags($prefix, array $suffixes, array $expected, $glue = ':') { $this->assertEquals($expected, Cache::buildTags($prefix, $suffixes, $glue)); diff --git a/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php b/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php index 6b233aa..9173348 100644 --- a/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php @@ -175,7 +175,7 @@ protected function getMockContainer() { * * @return array */ - public function validateTokensProvider() { + public function providerValidateTokens() { return [ [[], FALSE], [['foo'], FALSE], @@ -205,7 +205,7 @@ public function validateTokensProvider() { /** * @covers ::validateTokens * - * @dataProvider validateTokensProvider + * @dataProvider providerValidateTokens */ public function testValidateContexts(array $contexts, $expected_exception_message) { $container = new ContainerBuilder(); diff --git a/core/tests/Drupal/Tests/Core/Config/ConfigTest.php b/core/tests/Drupal/Tests/Core/Config/ConfigTest.php index a7ff94b..46f7f0a 100644 --- a/core/tests/Drupal/Tests/Core/Config/ConfigTest.php +++ b/core/tests/Drupal/Tests/Core/Config/ConfigTest.php @@ -72,7 +72,7 @@ public function setUp() { /** * @covers ::setName - * @dataProvider setNameProvider + * @dataProvider providerSetName */ public function testSetName($name) { // Set the name. @@ -91,7 +91,7 @@ public function testSetName($name) { * * @see \Drupal\Tests\Core\Config\ConfigTest::testSetName() */ - public function setNameProvider() { + public function providerSetName() { return array( // Valid name with dot. array( @@ -118,7 +118,7 @@ public function testIsNew() { /** * @covers ::setData - * @dataProvider nestedDataProvider + * @dataProvider providerNestedData */ public function testSetData($data) { $this->config->setData($data); @@ -128,7 +128,7 @@ public function testSetData($data) { /** * @covers ::save - * @dataProvider nestedDataProvider + * @dataProvider providerNestedData */ public function testSaveNew($data) { $this->cacheTagsInvalidator->expects($this->never()) @@ -154,7 +154,7 @@ public function testSaveNew($data) { /** * @covers ::save - * @dataProvider nestedDataProvider + * @dataProvider providerNestedData */ public function testSaveExisting($data) { $this->cacheTagsInvalidator->expects($this->once()) @@ -177,7 +177,7 @@ public function testSaveExisting($data) { * @covers ::setModuleOverride * @covers ::setSettingsOverride * @covers ::getOriginal - * @dataProvider overrideDataProvider + * @dataProvider providerOverrideData */ public function testOverrideData($data, $module_data, $setting_data) { // Set initial data. @@ -224,7 +224,7 @@ public function testOverrideData($data, $module_data, $setting_data) { /** * @covers ::set - * @dataProvider nestedDataProvider + * @dataProvider providerNestedData */ public function testSetValue($data) { foreach ($data as $key => $value) { @@ -255,7 +255,7 @@ public function testSetIllegalOffsetValue() { /** * @covers ::initWithData - * @dataProvider nestedDataProvider + * @dataProvider providerNestedData */ public function testInitWithData($data) { $config = $this->config->initWithData($data); @@ -278,7 +278,7 @@ public function testInitWithData($data) { /** * @covers ::clear - * @dataProvider simpleDataProvider + * @dataProvider providerSimpleData */ public function testClear($data) { foreach ($data as $key => $value) { @@ -292,7 +292,7 @@ public function testClear($data) { /** * @covers ::clear - * @dataProvider nestedDataProvider + * @dataProvider providerNestedData */ public function testNestedClear($data) { foreach ($data as $key => $value) { @@ -310,7 +310,7 @@ public function testNestedClear($data) { /** * @covers ::delete - * @dataProvider overrideDataProvider + * @dataProvider providerOverrideData */ public function testDelete($data, $module_data) { $this->cacheTagsInvalidator->expects($this->once()) @@ -355,7 +355,7 @@ public function testDelete($data, $module_data) { /** * @covers ::merge - * @dataProvider mergeDataProvider + * @dataProvider providerMergeData */ public function testMerge($data, $data_to_merge, $merged_data) { // Set initial data. @@ -373,7 +373,7 @@ public function testMerge($data, $data_to_merge, $merged_data) { * * @see \Drupal\Tests\Core\Config\ConfigTest::testMerge() */ - public function mergeDataProvider() { + public function providerMergeData() { return array( array( // Data. @@ -389,7 +389,7 @@ public function mergeDataProvider() { /** * @covers ::validateName * @expectedException \Drupal\Core\Config\ConfigNameException - * @dataProvider validateNameProvider + * @dataProvider providerValidateName */ public function testValidateNameException($name, $exception_message) { $this->setExpectedException('\Drupal\Core\Config\ConfigNameException', $exception_message); @@ -408,7 +408,7 @@ public function testGetCacheTags() { * * @see \Drupal\Tests\Core\Config\ConfigTest::testValidateNameException() */ - public function validateNameProvider() { + public function providerValidateName() { $return = array( // Name missing namespace (dot). array( @@ -438,7 +438,7 @@ public function validateNameProvider() { * @see \Drupal\Tests\Core\Config\ConfigTest::testOverrideData() * @see \Drupal\Tests\Core\Config\ConfigTest::testDelete() */ - public function overrideDataProvider() { + public function providerOverrideData() { return array( array( // Original data. @@ -462,7 +462,7 @@ public function overrideDataProvider() { * * @see \Drupal\Tests\Core\Config\ConfigTest::testClear() */ - public function simpleDataProvider() { + public function providerSimpleData() { return array( array( array( @@ -483,7 +483,7 @@ public function simpleDataProvider() { * @see \Drupal\Tests\Core\Config\ConfigTest::testInitWithData() * @see \Drupal\Tests\Core\Config\ConfigTest::testNestedClear() */ - public function nestedDataProvider() { + public function providerNestedData() { return array( array( array( diff --git a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php index c7dd97f..578c120 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php @@ -476,7 +476,7 @@ public function testResetImplementations() { } /** - * @dataProvider dependencyProvider + * @dataProvider providerDependency * @covers ::parseDependency */ public function testDependencyParsing($dependency, $expected) { @@ -487,7 +487,7 @@ public function testDependencyParsing($dependency, $expected) { /** * Provider for testing dependency parsing. */ - public function dependencyProvider() { + public function providerDependency() { return array( array('system', array('name' => 'system')), array('taxonomy', array('name' => 'taxonomy')), diff --git a/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php b/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php index 7bd51bc..d19b0cf 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormBuilderTest.php @@ -137,7 +137,7 @@ public function testGetFormIdWithBaseForm() { /** * Tests the handling of FormStateInterface::$response. * - * @dataProvider formStateResponseProvider + * @dataProvider providerFormStateResponse */ public function testHandleFormStateResponse($class, $form_state_key) { $form_id = 'test_form_id'; @@ -170,7 +170,7 @@ public function testHandleFormStateResponse($class, $form_state_key) { /** * Provides test data for testHandleFormStateResponse(). */ - public function formStateResponseProvider() { + public function providerFormStateResponse() { return array( array('Symfony\Component\HttpFoundation\Response', 'response'), array('Symfony\Component\HttpFoundation\RedirectResponse', 'redirect'), diff --git a/core/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php b/core/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php index d25a6f5..83883b0 100644 --- a/core/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php +++ b/core/tests/Drupal/Tests/Core/Form/FormElementHelperTest.php @@ -25,7 +25,7 @@ class FormElementHelperTest extends UnitTestCase { * * @covers ::getElementByName * - * @dataProvider getElementByNameProvider + * @dataProvider providerGetElementByName */ public function testGetElementByName($name, $form, $expected) { $this->assertSame($expected, FormElementHelper::getElementByName($name, $form)); @@ -34,7 +34,7 @@ public function testGetElementByName($name, $form, $expected) { /** * Provides test data. */ - public function getElementByNameProvider() { + public function providerGetElementByName() { $data = []; $data[] = ['id', [], []]; $data[] = [ @@ -110,7 +110,7 @@ public function getElementByNameProvider() { * * @covers ::getElementTitle * - * @dataProvider getElementTitleProvider + * @dataProvider providerGetElementTitle */ public function testGetElementTitle($name, $form, $expected) { $element = FormElementHelper::getElementByName($name, $form); @@ -120,7 +120,7 @@ public function testGetElementTitle($name, $form, $expected) { /** * Provides test data. */ - public function getElementTitleProvider() { + public function providerGetElementTitle() { $data = []; $data[] = ['id', [], '']; $data[] = [ diff --git a/core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php b/core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php index dcc4f55..cbad2a1 100644 --- a/core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Menu/LocalActionManagerTest.php @@ -143,7 +143,7 @@ public function testGetTitle() { /** * @covers ::getActionsForRoute * - * @dataProvider getActionsForRouteProvider + * @dataProvider providerActionsForRoute */ public function testGetActionsForRoute($route_appears, array $plugin_definitions, array $expected_actions) { $this->discovery->expects($this->any()) @@ -182,7 +182,7 @@ public function testGetActionsForRoute($route_appears, array $plugin_definitions $this->assertEquals($expected_actions, $this->localActionManager->getActionsForRoute($route_appears)); } - public function getActionsForRouteProvider() { + public function providerActionsForRoute() { // Single available and single expected plugins. $data[] = array( 'test_route', diff --git a/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php b/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php index e361bf5..4711d65 100644 --- a/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php +++ b/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php @@ -43,7 +43,7 @@ protected function setUp() { /** * Test that standard paths works with multiple patterns. * - * @dataProvider getMatchPathData + * @dataProvider providerMatchPathData */ public function testMatchPath($patterns, $paths) { foreach ($paths as $path => $expected_result) { @@ -58,7 +58,7 @@ public function testMatchPath($patterns, $paths) { * @return array * A nested array of pattern arrays and path arrays. */ - public function getMatchPathData() { + public function providerMatchPathData() { return array( array( // Single absolute paths. diff --git a/core/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php b/core/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php index 6d04fb7..b840deb 100644 --- a/core/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php +++ b/core/tests/Drupal/Tests/Core/Route/RoleAccessCheckTest.php @@ -90,7 +90,7 @@ protected function getTestRouteCollection() { * * @see \Drupal\Tests\Core\Route\RouterRoleTest::testRoleAccess */ - public function roleAccessProvider() { + public function providerRoleAccess() { // Setup two different roles used in the test. $rid_1 = 'role_test_1'; $rid_2 = 'role_test_2'; @@ -142,7 +142,7 @@ public function roleAccessProvider() { * @see \Drupal\Tests\Core\Route\RouterRoleTest::getTestRouteCollection * @see \Drupal\Tests\Core\Route\RouterRoleTest::roleAccessProvider * - * @dataProvider roleAccessProvider + * @dataProvider providerRoleAccess */ public function testRoleAccess($path, $grant_accounts, $deny_accounts) { $cache_contexts_manager = $this->prophesize(CacheContextsManager::class); diff --git a/core/tests/Drupal/Tests/Core/Routing/RouteMatchTestBase.php b/core/tests/Drupal/Tests/Core/Routing/RouteMatchTestBase.php index 846d46a..cb5f217 100644 --- a/core/tests/Drupal/Tests/Core/Routing/RouteMatchTestBase.php +++ b/core/tests/Drupal/Tests/Core/Routing/RouteMatchTestBase.php @@ -35,7 +35,7 @@ /** * Provide sets of parameters and expected parameters for parameter tests. */ - public function routeMatchProvider() { + public function providerRouteMatch() { $base_data = array( array( new Route( @@ -83,7 +83,7 @@ public function routeMatchProvider() { /** * @covers ::getRouteName - * @dataProvider routeMatchProvider + * @dataProvider providerRouteMatch */ public function testGetRouteName(RouteMatchInterface $route_match) { $this->assertSame('test_route', $route_match->getRouteName()); @@ -91,7 +91,7 @@ public function testGetRouteName(RouteMatchInterface $route_match) { /** * @covers ::getRouteObject - * @dataProvider routeMatchProvider + * @dataProvider providerRouteMatch */ public function testGetRouteObject(RouteMatchInterface $route_match, Route $route) { $this->assertSame($route, $route_match->getRouteObject()); @@ -100,7 +100,7 @@ public function testGetRouteObject(RouteMatchInterface $route_match, Route $rout /** * @covers ::getParameter * @covers \Drupal\Core\Routing\RouteMatch::getParameterNames - * @dataProvider routeMatchProvider + * @dataProvider providerRouteMatch */ public function testGetParameter(RouteMatchInterface $route_match, Route $route, $parameters, $expected_filtered_parameters) { foreach ($expected_filtered_parameters as $name => $expected_value) { @@ -114,7 +114,7 @@ public function testGetParameter(RouteMatchInterface $route_match, Route $route, /** * @covers ::getParameters * @covers \Drupal\Core\Routing\RouteMatch::getParameterNames - * @dataProvider routeMatchProvider + * @dataProvider providerRouteMatch */ public function testGetParameters(RouteMatchInterface $route_match, Route $route, $parameters, $expected_filtered_parameters) { $this->assertSame($expected_filtered_parameters, $route_match->getParameters()->all()); @@ -123,7 +123,7 @@ public function testGetParameters(RouteMatchInterface $route_match, Route $route /** * @covers ::getRawParameter * @covers \Drupal\Core\Routing\RouteMatch::getParameterNames - * @dataProvider routeMatchProvider + * @dataProvider providerRouteMatch */ public function testGetRawParameter(RouteMatchInterface $route_match, Route $route, $parameters, $expected_filtered_parameters) { foreach ($expected_filtered_parameters as $name => $expected_value) { @@ -137,7 +137,7 @@ public function testGetRawParameter(RouteMatchInterface $route_match, Route $rou /** * @covers ::getRawParameters * @covers \Drupal\Core\Routing\RouteMatch::getParameterNames - * @dataProvider routeMatchProvider + * @dataProvider providerRouteMatch */ public function testGetRawParameters(RouteMatchInterface $route_match, Route $route, $parameters, $expected_filtered_parameters) { $this->assertSame($expected_filtered_parameters, $route_match->getRawParameters()->all()); diff --git a/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php b/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php index df57290..68e01f8 100644 --- a/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php +++ b/core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php @@ -51,7 +51,7 @@ public function testNoProxy() { /** * Tests that subscriber sets trusted headers when reverse proxy is set. * - * @dataProvider reverseProxyEnabledProvider + * @dataProvider providerReverseProxyEnabled */ public function testReverseProxyEnabled($provided_settings) { // Enable reverse proxy and add test values. @@ -62,7 +62,7 @@ public function testReverseProxyEnabled($provided_settings) { /** * Data provider for testReverseProxyEnabled. */ - public function reverseProxyEnabledProvider() { + public function providerReverseProxyEnabled() { return array( array( array( diff --git a/core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php b/core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php index 80eed7a..313dc2f 100644 --- a/core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php +++ b/core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php @@ -43,7 +43,7 @@ protected function setUp() { /** * Tests that dangerous methods cannot be called in entity objects. * - * @dataProvider getTwigEntityDangerousMethods + * @dataProvider providerTwigEntityDangerousMethods * @expectedException \Twig_Sandbox_SecurityError */ public function testEntityDangerousMethods($template) { @@ -56,7 +56,7 @@ public function testEntityDangerousMethods($template) { * * @return array */ - public function getTwigEntityDangerousMethods() { + public function providerTwigEntityDangerousMethods() { return [ ['{{ entity.delete }}'], ['{{ entity.save }}'], diff --git a/core/tests/Drupal/Tests/Core/UrlTest.php b/core/tests/Drupal/Tests/Core/UrlTest.php index 635eec3..61fec4c 100644 --- a/core/tests/Drupal/Tests/Core/UrlTest.php +++ b/core/tests/Drupal/Tests/Core/UrlTest.php @@ -463,7 +463,7 @@ public function testGetOptions($urls) { * * @covers ::access * @covers ::accessManager - * @dataProvider accessProvider + * @dataProvider providerAccess */ public function testAccessRouted($access) { $account = $this->getMock('Drupal\Core\Session\AccountInterface'); @@ -493,7 +493,7 @@ public function testAccessUnrouted() { * @param bool $access * * @covers ::renderAccess - * @dataProvider accessProvider + * @dataProvider providerAccess */ public function testRenderAccess($access) { $element = array( @@ -805,7 +805,7 @@ protected function getMockAccessManager($access, $account = NULL) { /** * Data provider for the access test methods. */ - public function accessProvider() { + public function providerAccess() { return array( array(TRUE), array(FALSE),