Issue #3353210 by mondrake, PrabuEla, Spokje: [PHPUnit 10] @dataProvider methods must be declared static and public

merge-requests/6112/merge
Dave Long 2024-02-14 13:38:28 +00:00
parent 4c6cd6e343
commit 654b1f2074
No known key found for this signature in database
GPG Key ID: ED52AE211E142771
674 changed files with 995 additions and 995 deletions

View File

@ -68,7 +68,7 @@ class AnnounceFetcherTest extends AnnounceTestBase {
/** /**
* Data provider for testShowAnnouncements(). * Data provider for testShowAnnouncements().
*/ */
public function providerShowAnnouncements(): array { public static function providerShowAnnouncements(): array {
return [ return [
'1' => [ '1' => [
'feed_item' => [ 'feed_item' => [

View File

@ -57,7 +57,7 @@ class AnnounceFetcherUnitTest extends UnitTestCase {
/** /**
* Data for the testValidateUrl. * Data for the testValidateUrl.
*/ */
public function urlProvider(): array { public static function urlProvider(): array {
return [ return [
['https://www.drupal.org', TRUE], ['https://www.drupal.org', TRUE],
['https://drupal.org', TRUE], ['https://drupal.org', TRUE],

View File

@ -20,7 +20,7 @@ class BlockedIpsTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = []; $tests = [];
$tests[0]['source_data']['blocked_ips'] = [ $tests[0]['source_data']['blocked_ips'] = [

View File

@ -63,7 +63,7 @@ class BigPipeStrategyTest extends UnitTestCase {
/** /**
* @see \Drupal\big_pipe_test\BigPipePlaceholderTestCases * @see \Drupal\big_pipe_test\BigPipePlaceholderTestCases
*/ */
public function placeholdersProvider() { public static function placeholdersProvider() {
$cases = BigPipePlaceholderTestCases::cases(); $cases = BigPipePlaceholderTestCases::cases();
// Generate $placeholders variable as expected by // Generate $placeholders variable as expected by

View File

@ -37,7 +37,7 @@ final class ContentLengthTest extends UnitTestCase {
$this->assertSame((string) $expected_header, $response->headers->get('Content-Length')); $this->assertSame((string) $expected_header, $response->headers->get('Content-Length'));
} }
public function providerTestSetContentLengthHeader() { public static function providerTestSetContentLengthHeader() {
$response = new Response('Test content', 200); $response = new Response('Test content', 200);
$response->headers->set('Content-Length', (string) strlen('Test content')); $response->headers->set('Content-Length', (string) strlen('Test content'));
return [ return [

View File

@ -20,7 +20,7 @@ class BlockTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = []; $tests = [];
// The source data. // The source data.

View File

@ -21,7 +21,7 @@ class BlockTranslationTest extends BlockTest {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
// Test data is the same as BlockTest, but with the addition of i18n_blocks. // Test data is the same as BlockTest, but with the addition of i18n_blocks.
$tests = parent::providerSource(); $tests = parent::providerSource();

View File

@ -23,7 +23,7 @@ class BlockTranslationTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
// The source data. // The source data.
$tests[0]['source_data']['block'] = [ $tests[0]['source_data']['block'] = [

View File

@ -112,7 +112,7 @@ class BlockRepositoryTest extends UnitTestCase {
$this->assertEquals($expected_blocks, $result); $this->assertEquals($expected_blocks, $result);
} }
public function providerBlocksConfig() { public static function providerBlocksConfig() {
$blocks_config = [ $blocks_config = [
'block1' => [ 'block1' => [
AccessResult::allowed(), 'top', 0, AccessResult::allowed(), 'top', 0,

View File

@ -61,7 +61,7 @@ class CategoryAutocompleteTest extends UnitTestCase {
* *
* @return array * @return array
*/ */
public function providerTestAutocompleteSuggestions() { public static function providerTestAutocompleteSuggestions() {
$test_parameters = []; $test_parameters = [];
$test_parameters[] = [ $test_parameters[] = [
'string' => 'Com', 'string' => 'Com',

View File

@ -83,7 +83,7 @@ class BlockLocalTasksTest extends LocalTaskIntegrationTestBase {
/** /**
* Provides a list of routes to test. * Provides a list of routes to test.
*/ */
public function providerTestBlockAdminDisplay() { public static function providerTestBlockAdminDisplay() {
return [ return [
['block.admin_display', [['block.admin_display'], ['block.admin_display_theme:test_b', 'block.admin_display_theme:test_c']]], ['block.admin_display', [['block.admin_display'], ['block.admin_display_theme:test_b', 'block.admin_display_theme:test_c']]],
['block.admin_display_theme', [['block.admin_display'], ['block.admin_display_theme:test_b', 'block.admin_display_theme:test_c']]], ['block.admin_display_theme', [['block.admin_display'], ['block.admin_display_theme:test_b', 'block.admin_display_theme:test_c']]],

View File

@ -68,7 +68,7 @@ class BlockPageVariantTest extends UnitTestCase {
->getMock(); ->getMock();
} }
public function providerBuild() { public static function providerBuild() {
$blocks_config = [ $blocks_config = [
'block1' => [ 'block1' => [
// region, is main content block, is messages block, is title block // region, is main content block, is messages block, is title block

View File

@ -40,7 +40,7 @@ class BlockSettingsTest extends UnitTestCase {
/** /**
* Provides data for testTransform. * Provides data for testTransform.
*/ */
public function providerTestTransform() { public static function providerTestTransform() {
return [ return [
'title set' => [ 'title set' => [
[ [

View File

@ -191,7 +191,7 @@ class BlockContentAccessHandlerTest extends KernelTestBase {
/** /**
* Data provider for testAccess(). * Data provider for testAccess().
*/ */
public function providerTestAccess(): array { public static function providerTestAccess(): array {
$cases = [ $cases = [
'view:published:reusable' => [ 'view:published:reusable' => [
'view', 'view',

View File

@ -177,7 +177,7 @@ class BlockContentEntityReferenceSelectionTest extends KernelTestBase {
/** /**
* Provides possible fields and condition types. * Provides possible fields and condition types.
*/ */
public function fieldConditionProvider() { public static function fieldConditionProvider() {
$cases = []; $cases = [];
foreach (['base', 'group', 'nested_group'] as $condition_type) { foreach (['base', 'group', 'nested_group'] as $condition_type) {
foreach ([TRUE, FALSE] as $reusable) { foreach ([TRUE, FALSE] as $reusable) {

View File

@ -20,7 +20,7 @@ class BoxTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = []; $tests = [];
$tests[0]['source_data']['boxes'] = [ $tests[0]['source_data']['boxes'] = [

View File

@ -23,7 +23,7 @@ class BoxTranslationTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = []; $tests = [];
// The source data. // The source data.

View File

@ -20,7 +20,7 @@ class BlockCustomTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = []; $tests = [];
$tests[0]['source_data']['block_custom'] = [ $tests[0]['source_data']['block_custom'] = [

View File

@ -23,7 +23,7 @@ class BlockCustomTranslationTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = []; $tests = [];
// The source data. // The source data.

View File

@ -142,7 +142,7 @@ class DependentAccessTest extends UnitTestCase {
* mergeAccessDependency() first. A call to either should behave the same on a * mergeAccessDependency() first. A call to either should behave the same on a
* new RefinableDependentAccessInterface object. * new RefinableDependentAccessInterface object.
*/ */
public function providerTestSetFirst() { public static function providerTestSetFirst() {
return [ return [
[TRUE], [TRUE],
[FALSE], [FALSE],

View File

@ -80,7 +80,7 @@ class BlockContentLocalTasksTest extends LocalTaskIntegrationTestBase {
/** /**
* Provides a list of routes to test. * Provides a list of routes to test.
*/ */
public function getBlockContentListingRoutes() { public static function getBlockContentListingRoutes() {
return [ return [
['entity.block_content.collection', 'system.admin_content'], ['entity.block_content.collection', 'system.admin_content'],
]; ];

View File

@ -256,7 +256,7 @@ class BookMultilingualTest extends KernelTestBase {
/** /**
* Data provider for ::testMultilingualBooks(). * Data provider for ::testMultilingualBooks().
*/ */
public function langcodesProvider() { public static function langcodesProvider() {
return [ return [
[self::LANGCODE], [self::LANGCODE],
['en'], ['en'],

View File

@ -32,7 +32,7 @@ class MigrateBookConfigsTest extends MigrateDrupal6TestBase {
* @return array * @return array
* The data for each test scenario. * The data for each test scenario.
*/ */
public function providerBookSettings() { public static function providerBookSettings() {
return [ return [
// d6_book_settings was renamed to book_settings, but use the old alias to // d6_book_settings was renamed to book_settings, but use the old alias to
// prove that it works. // prove that it works.

View File

@ -18,7 +18,7 @@ class BookTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = []; $tests = [];
// The source data. // The source data.

View File

@ -104,7 +104,7 @@ class BookManagerTest extends UnitTestCase {
* @return array * @return array
* The test data. * The test data.
*/ */
public function providerTestGetBookParents() { public static function providerTestGetBookParents() {
$empty = [ $empty = [
'p1' => 0, 'p1' => 0,
'p2' => 0, 'p2' => 0,

View File

@ -39,7 +39,7 @@ class BookLocalTasksTest extends LocalTaskIntegrationTestBase {
/** /**
* Provides a list of routes to test. * Provides a list of routes to test.
*/ */
public function getBookAdminRoutes() { public static function getBookAdminRoutes() {
return [ return [
['book.admin'], ['book.admin'],
['book.settings'], ['book.settings'],
@ -60,7 +60,7 @@ class BookLocalTasksTest extends LocalTaskIntegrationTestBase {
/** /**
* Provides a list of routes to test. * Provides a list of routes to test.
*/ */
public function getBookNodeRoutes() { public static function getBookNodeRoutes() {
return [ return [
['entity.node.canonical'], ['entity.node.canonical'],
['entity.node.book_outline_form'], ['entity.node.book_outline_form'],

View File

@ -146,7 +146,7 @@ class CKEditor5UpdateImageToolbarItemTest extends UpdatePathTestBase {
* @return array * @return array
* The test cases. * The test cases.
*/ */
public function provider(): array { public static function provider(): array {
// There are 3 aspects that need to be verified, each can be true or false, // There are 3 aspects that need to be verified, each can be true or false,
// making for 8 test cases in total. // making for 8 test cases in total.
$test_cases = []; $test_cases = [];

View File

@ -450,14 +450,14 @@ abstract class ImageTestBase extends CKEditor5TestBase {
$this->assertVisibleBalloon('.ck-text-alternative-form'); $this->assertVisibleBalloon('.ck-text-alternative-form');
} }
public function providerAltTextRequired(): array { public static function providerAltTextRequired(): array {
return [ return [
'Restricted' => [FALSE], 'Restricted' => [FALSE],
'Unrestricted' => [TRUE], 'Unrestricted' => [TRUE],
]; ];
} }
public function providerLinkability(): array { public static function providerLinkability(): array {
return [ return [
'BLOCK image, restricted' => ['block', FALSE], 'BLOCK image, restricted' => ['block', FALSE],
'BLOCK image, unrestricted' => ['block', TRUE], 'BLOCK image, unrestricted' => ['block', TRUE],
@ -528,7 +528,7 @@ abstract class ImageTestBase extends CKEditor5TestBase {
$this->assertFalse($drupal_media_element->hasAttribute('data-align')); $this->assertFalse($drupal_media_element->hasAttribute('data-align'));
} }
public function providerAlignment() { public static function providerAlignment() {
return [ return [
'Block image' => ['block'], 'Block image' => ['block'],
'Inline image' => ['inline'], 'Inline image' => ['inline'],
@ -620,7 +620,7 @@ abstract class ImageTestBase extends CKEditor5TestBase {
* *
* @return string[][] * @return string[][]
*/ */
public function providerWidth(): array { public static function providerWidth(): array {
return [ return [
'Image resize with percent unit (only allowed in HTML 4)' => [ 'Image resize with percent unit (only allowed in HTML 4)' => [
'width' => '33%', 'width' => '33%',
@ -674,7 +674,7 @@ abstract class ImageTestBase extends CKEditor5TestBase {
* @return array * @return array
* The test cases. * The test cases.
*/ */
public function providerResize(): array { public static function providerResize(): array {
return [ return [
'Image resize is enabled' => [ 'Image resize is enabled' => [
'is_resize_enabled' => TRUE, 'is_resize_enabled' => TRUE,

View File

@ -82,7 +82,7 @@ JS;
* *
* @return string[][] * @return string[][]
*/ */
public function provider(): array { public static function provider(): array {
return [ return [
'Language code both in Drupal and CKEditor' => [ 'Language code both in Drupal and CKEditor' => [
'langcode' => 'th', 'langcode' => 'th',

View File

@ -221,7 +221,7 @@ class MediaLinkabilityTest extends MediaTestBase {
$this->assertEmpty($xpath->query('//a')); $this->assertEmpty($xpath->query('//a'));
} }
public function providerLinkability(): array { public static function providerLinkability(): array {
return [ return [
'restricted' => [FALSE], 'restricted' => [FALSE],
'unrestricted' => [TRUE], 'unrestricted' => [TRUE],

View File

@ -186,7 +186,7 @@ class MediaPreviewTest extends MediaTestBase {
/** /**
* Data provider for ::testEmbedPreviewAccess. * Data provider for ::testEmbedPreviewAccess.
*/ */
public function previewAccessProvider() { public static function previewAccessProvider() {
return [ return [
'media_embed filter enabled' => [ 'media_embed filter enabled' => [
TRUE, TRUE,

View File

@ -1007,7 +1007,7 @@ class MediaTest extends MediaTestBase {
/** /**
* For testing view modes in different scenarios. * For testing view modes in different scenarios.
*/ */
public function providerTestViewMode(): array { public static function providerTestViewMode(): array {
return [ return [
'with alignment' => [TRUE], 'with alignment' => [TRUE],
'without alignment' => [FALSE], 'without alignment' => [FALSE],

View File

@ -118,7 +118,7 @@ JS;
* @return array * @return array
* The test cases. * The test cases.
*/ */
public function providerAllowingExtraAttributes(): array { public static function providerAllowingExtraAttributes(): array {
$general_test_case_markup = '<div class="llama" data-llama="🦙"><p data-llama="🦙">The <a href="https://example.com/pirate" class="button" data-grammar="subject">pirate</a> is <a href="https://example.com/irate" class="use-ajax" data-grammar="adjective">irate</a>.</p></div>'; $general_test_case_markup = '<div class="llama" data-llama="🦙"><p data-llama="🦙">The <a href="https://example.com/pirate" class="button" data-grammar="subject">pirate</a> is <a href="https://example.com/irate" class="use-ajax" data-grammar="adjective">irate</a>.</p></div>';
return [ return [
'no extra attributes allowed' => [ 'no extra attributes allowed' => [

View File

@ -201,7 +201,7 @@ YAML,
* @return \Generator * @return \Generator
* Test scenarios. * Test scenarios.
*/ */
public function providerTestInvalidPluginDefinitions(): \Generator { public static function providerTestInvalidPluginDefinitions(): \Generator {
yield 'invalid plugin ID with everything else okay' => [ yield 'invalid plugin ID with everything else okay' => [
<<<YAML <<<YAML
foo_bar: foo_bar:
@ -1282,7 +1282,7 @@ PHP,
/** /**
* Provides uses cases enabling different elements and the expected results. * Provides uses cases enabling different elements and the expected results.
*/ */
public function providerTestProvidedElements(): array { public static function providerTestProvidedElements(): array {
$text_align_classes = [ $text_align_classes = [
'text-align-left' => TRUE, 'text-align-left' => TRUE,
'text-align-center' => TRUE, 'text-align-center' => TRUE,
@ -1507,7 +1507,7 @@ PHP,
/** /**
* Provides use cases for findPluginSupportingElement(). * Provides use cases for findPluginSupportingElement().
*/ */
public function providerTestPluginSupportingElement() { public static function providerTestPluginSupportingElement() {
return [ return [
'tag that belongs to a superset' => [ 'tag that belongs to a superset' => [
'tag' => 'h2', 'tag' => 'h2',

View File

@ -46,7 +46,7 @@ class CKEditor5StylesheetsTest extends KernelTestBase {
* @return array * @return array
* An array of test cases. * An array of test cases.
*/ */
public function externalStylesheetsProvider() { public static function externalStylesheetsProvider() {
return [ return [
'Install theme which has an absolute external CSS URL' => [ 'Install theme which has an absolute external CSS URL' => [
'test_ckeditor_stylesheets_external', 'test_ckeditor_stylesheets_external',

View File

@ -649,7 +649,7 @@ class SmartDefaultSettingsTest extends KernelTestBase {
* @return \Generator * @return \Generator
* Test scenarios. * Test scenarios.
*/ */
public function provider() { public static function provider() {
$basic_html_test_case = [ $basic_html_test_case = [
'format_id' => 'basic_html', 'format_id' => 'basic_html',
'filters_to_drop' => [], 'filters_to_drop' => [],

View File

@ -110,7 +110,7 @@ class ValidatorsTest extends KernelTestBase {
/** /**
* Provides a list of Text Editor config entities using CKEditor 5 to test. * Provides a list of Text Editor config entities using CKEditor 5 to test.
*/ */
public function provider(): array { public static function provider(): array {
$data = []; $data = [];
$data['CKEditor5::getDefaultSettings()'] = [ $data['CKEditor5::getDefaultSettings()'] = [
// @see ::test() // @see ::test()
@ -703,7 +703,7 @@ class ValidatorsTest extends KernelTestBase {
/** /**
* Provides a list of Text Editor + Text Format pairs to test. * Provides a list of Text Editor + Text Format pairs to test.
*/ */
public function providerPair(): array { public static function providerPair(): array {
// cspell:ignore donk // cspell:ignore donk
$data = []; $data = [];
$data['INVALID: allow_view_mode_override condition not met: filter must be configured to allow 2 or more view modes'] = [ $data['INVALID: allow_view_mode_override condition not met: filter must be configured to allow 2 or more view modes'] = [

View File

@ -99,7 +99,7 @@ class WildcardHtmlSupportTest extends KernelTestBase {
$this->assertEquals($expected_ghs_configuration, $ghs_configuration); $this->assertEquals($expected_ghs_configuration, $ghs_configuration);
} }
public function providerGhsConfiguration(): array { public static function providerGhsConfiguration(): array {
return [ return [
'empty source editing' => [ 'empty source editing' => [
'<p> <br>', '<p> <br>',

View File

@ -19,7 +19,7 @@ class AlignmentPluginTest extends UnitTestCase {
/** /**
* Provides a list of configs to test. * Provides a list of configs to test.
*/ */
public function providerGetDynamicPluginConfig(): array { public static function providerGetDynamicPluginConfig(): array {
return [ return [
'All alignments' => [ 'All alignments' => [
Alignment::DEFAULT_CONFIGURATION, Alignment::DEFAULT_CONFIGURATION,

View File

@ -62,7 +62,7 @@ class CKEditor5Test extends UnitTestCase {
* @return array[] * @return array[]
* An array with the property path and expected form item name. * An array with the property path and expected form item name.
*/ */
public function providerPathsToFormNames(): array { public static function providerPathsToFormNames(): array {
return [ return [
'validation error targeting toolbar items' => [ 'validation error targeting toolbar items' => [
'settings.toolbar.items', 'settings.toolbar.items',

View File

@ -27,7 +27,7 @@ class HTMLRestrictionsTest extends UnitTestCase {
new HTMLRestrictions($elements); new HTMLRestrictions($elements);
} }
public function providerConstruct(): \Generator { public static function providerConstruct(): \Generator {
// Fundamental structure. // Fundamental structure.
yield 'INVALID: list instead of key-value pairs' => [ yield 'INVALID: list instead of key-value pairs' => [
['<foo>', '<bar>'], ['<foo>', '<bar>'],
@ -166,7 +166,7 @@ class HTMLRestrictionsTest extends UnitTestCase {
$this->assertCount($expected_concrete_plus_wildcard_count, $r->getAllowedElements(FALSE)); $this->assertCount($expected_concrete_plus_wildcard_count, $r->getAllowedElements(FALSE));
} }
public function providerCounting(): \Generator { public static function providerCounting(): \Generator {
yield 'empty' => [ yield 'empty' => [
[], [],
TRUE, TRUE,
@ -256,7 +256,7 @@ class HTMLRestrictionsTest extends UnitTestCase {
$this->assertSame($expected_raw + $filter_html_additional_expectations, HTMLRestrictions::fromFilterPluginInstance($filter_plugin_instance->reveal())->getAllowedElements(FALSE)); $this->assertSame($expected_raw + $filter_html_additional_expectations, HTMLRestrictions::fromFilterPluginInstance($filter_plugin_instance->reveal())->getAllowedElements(FALSE));
} }
public function providerConvenienceConstructors(): \Generator { public static function providerConvenienceConstructors(): \Generator {
// All empty cases. // All empty cases.
yield 'empty string' => [ yield 'empty string' => [
'', '',
@ -638,7 +638,7 @@ class HTMLRestrictionsTest extends UnitTestCase {
$this->assertSame($expected_ghs_config, $restrictions->toGeneralHtmlSupportConfig()); $this->assertSame($expected_ghs_config, $restrictions->toGeneralHtmlSupportConfig());
} }
public function providerRepresentations(): \Generator { public static function providerRepresentations(): \Generator {
yield 'empty set' => [ yield 'empty set' => [
HTMLRestrictions::emptySet(), HTMLRestrictions::emptySet(),
[], [],
@ -904,7 +904,7 @@ class HTMLRestrictionsTest extends UnitTestCase {
$this->assertEquals($expected_union, $a->merge($b)); $this->assertEquals($expected_union, $a->merge($b));
} }
public function providerOperands(): \Generator { public static function providerOperands(): \Generator {
// Empty set operand cases. // Empty set operand cases.
yield 'any set + empty set' => [ yield 'any set + empty set' => [
'a' => new HTMLRestrictions(['a' => ['href' => TRUE]]), 'a' => new HTMLRestrictions(['a' => ['href' => TRUE]]),
@ -1504,7 +1504,7 @@ class HTMLRestrictionsTest extends UnitTestCase {
$this->assertEquals($expected_extracted_plain_tags_subset, $input->extractPlainTagsSubset()); $this->assertEquals($expected_extracted_plain_tags_subset, $input->extractPlainTagsSubset());
} }
public function providerSubsets(): \Generator { public static function providerSubsets(): \Generator {
yield 'empty set' => [ yield 'empty set' => [
new HTMLRestrictions([]), new HTMLRestrictions([]),
new HTMLRestrictions([]), new HTMLRestrictions([]),

View File

@ -19,7 +19,7 @@ class HeadingPluginTest extends UnitTestCase {
/** /**
* Provides a list of configs to test. * Provides a list of configs to test.
*/ */
public function providerGetDynamicPluginConfig(): array { public static function providerGetDynamicPluginConfig(): array {
// Prepare headings matching ckeditor5.ckeditor5.yml to also protect // Prepare headings matching ckeditor5.ckeditor5.yml to also protect
// against unexpected changes to the YAML file given the YAML file is used // against unexpected changes to the YAML file given the YAML file is used
// to generate the dynamic plugin configuration. // to generate the dynamic plugin configuration.

View File

@ -19,7 +19,7 @@ class ListPluginTest extends UnitTestCase {
/** /**
* Provides a list of configs to test. * Provides a list of configs to test.
*/ */
public function providerGetDynamicPluginConfig(): array { public static function providerGetDynamicPluginConfig(): array {
return [ return [
'startIndex is false' => [ 'startIndex is false' => [
[ [

View File

@ -34,7 +34,7 @@ class SmartDefaultSettingsTest extends UnitTestCase {
* *
* @return \Generator * @return \Generator
*/ */
public function providerSurplusScore(): \Generator { public static function providerSurplusScore(): \Generator {
$needed = new HTMLRestrictions(['code' => FALSE]); $needed = new HTMLRestrictions(['code' => FALSE]);
yield 'surplus: 1 tag, 1 attribute, 1 attribute with wildcard restriction' => [ yield 'surplus: 1 tag, 1 attribute, 1 attribute with wildcard restriction' => [
@ -92,7 +92,7 @@ class SmartDefaultSettingsTest extends UnitTestCase {
* *
* @return \Generator * @return \Generator
*/ */
public function providerCandidates(): \Generator { public static function providerCandidates(): \Generator {
$generate_definition = function (string $label_and_id, array $overrides): CKEditor5PluginDefinition { $generate_definition = function (string $label_and_id, array $overrides): CKEditor5PluginDefinition {
$annotation = [ $annotation = [
'provider' => 'test', 'provider' => 'test',

View File

@ -18,7 +18,7 @@ class SourceEditingPluginTest extends UnitTestCase {
/** /**
* Provides a list of configs to test. * Provides a list of configs to test.
*/ */
public function providerGetDynamicPluginConfig(): array { public static function providerGetDynamicPluginConfig(): array {
return [ return [
'Empty array of allowed tags' => [ 'Empty array of allowed tags' => [
[ [

View File

@ -18,7 +18,7 @@ class StylePluginTest extends UnitTestCase {
/** /**
* Provides a list of configs to test. * Provides a list of configs to test.
*/ */
public function providerGetDynamicPluginConfig(): array { public static function providerGetDynamicPluginConfig(): array {
return [ return [
'default configuration (empty)' => [ 'default configuration (empty)' => [
[ [

View File

@ -124,7 +124,7 @@ class CommentOrphanTest extends EntityKernelTestBase {
/** /**
* Provides test data for testOrphan. * Provides test data for testOrphan.
*/ */
public function providerTestOrphan() { public static function providerTestOrphan() {
return [ return [
['entity_id'], ['entity_id'],
['uid'], ['uid'],

View File

@ -113,7 +113,7 @@ class MigrateCommentTypeTest extends MigrateDrupal6TestBase {
/** /**
* Provides test cases for ::testNoCommentTypeMigration(). * Provides test cases for ::testNoCommentTypeMigration().
*/ */
public function providerTestNoCommentTypeMigration() { public static function providerTestNoCommentTypeMigration() {
return [ return [
'Node module is disabled in source' => [ 'Node module is disabled in source' => [
'Disabled source modules' => ['node'], 'Disabled source modules' => ['node'],

View File

@ -46,7 +46,7 @@ class CommentEntityTranslationCheckRequirementsTest extends MigrateDrupal7TestBa
* *
* @return string[][] * @return string[][]
*/ */
public function providerTestCheckRequirements() { public static function providerTestCheckRequirements() {
return [ return [
['comment'], ['comment'],
['node'], ['node'],

View File

@ -119,7 +119,7 @@ class MigrateCommentTypeTest extends MigrateDrupal7TestBase {
/** /**
* Provides test cases for ::testNoCommentTypeMigration(). * Provides test cases for ::testNoCommentTypeMigration().
*/ */
public function providerTestNoCommentTypeMigration() { public static function providerTestNoCommentTypeMigration() {
return [ return [
'Node module is disabled in source' => [ 'Node module is disabled in source' => [
'Disabled source modules' => ['node'], 'Disabled source modules' => ['node'],

View File

@ -47,7 +47,7 @@ class CommentTypeRequirementsTest extends MigrateDrupal7TestBase {
/** /**
* Test cases for ::testCheckCommentTypeRequirements(). * Test cases for ::testCheckCommentTypeRequirements().
*/ */
public function providerTestCheckCommentTypeRequirements() { public static function providerTestCheckCommentTypeRequirements() {
return [ return [
'D6 comment is disabled on source' => [ 'D6 comment is disabled on source' => [
'Disabled source modules' => ['comment'], 'Disabled source modules' => ['comment'],

View File

@ -21,7 +21,7 @@ class CommentTypeTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$node_type_rows = [ $node_type_rows = [
[ [
'type' => 'page', 'type' => 'page',

View File

@ -21,7 +21,7 @@ class CommentSourceWithHighWaterTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = []; $tests = [];
// The source data. // The source data.

View File

@ -20,7 +20,7 @@ class CommentTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = []; $tests = [];
// The source data. // The source data.

View File

@ -22,7 +22,7 @@ class CommentEntityTranslationTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = []; $tests = [];
// The source data. // The source data.

View File

@ -22,7 +22,7 @@ class CommentTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = []; $tests = [];
// The source data. // The source data.

View File

@ -33,7 +33,7 @@ class ConfigLocalTasksTest extends LocalTaskIntegrationTestBase {
/** /**
* Provides a list of routes to test. * Provides a list of routes to test.
*/ */
public function getConfigAdminRoutes() { public static function getConfigAdminRoutes() {
return [ return [
['config.sync', [['config.sync', 'config.import', 'config.export']]], ['config.sync', [['config.sync', 'config.import', 'config.export']]],
['config.import_full', [['config.sync', 'config.import', 'config.export'], ['config.import_full', 'config.import_single']]], ['config.import_full', [['config.sync', 'config.import', 'config.export'], ['config.import_full', 'config.import_single']]],

View File

@ -22,7 +22,7 @@ class ProfileFieldTranslationTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$test = []; $test = [];
$test[0]['source_data'] = [ $test[0]['source_data'] = [
'profile_fields' => [ 'profile_fields' => [

View File

@ -523,7 +523,7 @@ class ConfigNamesMapperTest extends UnitTestCase {
* hasConfigSchema() as the first value and the expected return value of * hasConfigSchema() as the first value and the expected return value of
* ConfigNamesMapper::hasSchema() as the second value. * ConfigNamesMapper::hasSchema() as the second value.
*/ */
public function providerTestHasSchema() { public static function providerTestHasSchema() {
return [ return [
[[TRUE], TRUE], [[TRUE], TRUE],
[[FALSE], FALSE], [[FALSE], FALSE],
@ -570,7 +570,7 @@ class ConfigNamesMapperTest extends UnitTestCase {
* hasTranslatable() as the first value and the expected return value of * hasTranslatable() as the first value and the expected return value of
* ConfigNamesMapper::hasTranslatable() as the second value. * ConfigNamesMapper::hasTranslatable() as the second value.
*/ */
public function providerTestHasTranslatable() { public static function providerTestHasTranslatable() {
return [ return [
[[], FALSE], [[], FALSE],
[[TRUE], TRUE], [[TRUE], TRUE],
@ -621,7 +621,7 @@ class ConfigNamesMapperTest extends UnitTestCase {
* hasTranslation() as the first value and the expected return value of * hasTranslation() as the first value and the expected return value of
* ConfigNamesMapper::hasTranslation() as the second value. * ConfigNamesMapper::hasTranslation() as the second value.
*/ */
public function providerTestHasTranslation() { public static function providerTestHasTranslation() {
return [ return [
[[TRUE], TRUE], [[TRUE], TRUE],
[[FALSE], FALSE], [[FALSE], FALSE],

View File

@ -20,7 +20,7 @@ class ContactCategoryTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = [ $tests = [
[ [
'source_data' => [], 'source_data' => [],

View File

@ -20,7 +20,7 @@ class ContactSettingsTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = []; $tests = [];
$tests[0]['source_data']['variable'] = [ $tests[0]['source_data']['variable'] = [

View File

@ -102,7 +102,7 @@ class ModerationActionsTest extends BrowserTestBase {
* @return array * @return array
* An array of test cases. * An array of test cases.
*/ */
public function nodeStatusActionsTestCases() { public static function nodeStatusActionsTestCases() {
return [ return [
'Moderated bundle shows warning (publish action)' => [ 'Moderated bundle shows warning (publish action)' => [
'node_publish_action', 'node_publish_action',

View File

@ -261,7 +261,7 @@ class ViewsModerationStateFilterTest extends ViewTestBase {
* @return string[] * @return string[]
* An array of view IDs. * An array of view IDs.
*/ */
public function providerTestWorkflowChanges() { public static function providerTestWorkflowChanges() {
return [ return [
'view on base table, filter on base table' => [ 'view on base table, filter on base table' => [
'test_content_moderation_state_filter_base_table', 'test_content_moderation_state_filter_base_table',

View File

@ -48,7 +48,7 @@ class ContentModerationPermissionsTest extends KernelTestBase {
* @return array * @return array
* Content moderation permissions based test cases. * Content moderation permissions based test cases.
*/ */
public function permissionsTestCases() { public static function permissionsTestCases() {
return [ return [
'Simple Content Moderation Workflow' => [ 'Simple Content Moderation Workflow' => [
[ [

View File

@ -169,7 +169,7 @@ class ContentModerationStateTest extends KernelTestBase {
/** /**
* Test cases for basic moderation test. * Test cases for basic moderation test.
*/ */
public function basicModerationTestCases() { public static function basicModerationTestCases() {
return [ return [
'Nodes' => [ 'Nodes' => [
'node', 'node',
@ -480,7 +480,7 @@ class ContentModerationStateTest extends KernelTestBase {
/** /**
* Test cases for ::testModerationWithSpecialLanguages(). * Test cases for ::testModerationWithSpecialLanguages().
*/ */
public function moderationWithSpecialLanguagesTestCases() { public static function moderationWithSpecialLanguagesTestCases() {
return [ return [
'Not specified to not specified' => [ 'Not specified to not specified' => [
LanguageInterface::LANGCODE_NOT_SPECIFIED, LanguageInterface::LANGCODE_NOT_SPECIFIED,

View File

@ -364,7 +364,7 @@ class EntityStateChangeValidationTest extends KernelTestBase {
/** /**
* Test cases for ::testTransitionAccessValidation. * Test cases for ::testTransitionAccessValidation.
*/ */
public function transitionAccessValidationTestCases() { public static function transitionAccessValidationTestCases() {
return [ return [
'Invalid transition, no permissions validated' => [ 'Invalid transition, no permissions validated' => [
[], [],

View File

@ -98,7 +98,7 @@ class EntityTypeInfoTest extends KernelTestBase {
* - An entity type ID. * - An entity type ID.
* - Whether the entity type is moderatable or not. * - Whether the entity type is moderatable or not.
*/ */
public function providerTestEntityTypeAlter() { public static function providerTestEntityTypeAlter() {
$tests = []; $tests = [];
$tests['non_internal_non_revisionable'] = ['entity_test', FALSE]; $tests['non_internal_non_revisionable'] = ['entity_test', FALSE];
$tests['non_internal_revisionable'] = ['entity_test_rev', TRUE]; $tests['non_internal_revisionable'] = ['entity_test_rev', TRUE];

View File

@ -97,7 +97,7 @@ class ModerationInformationTest extends KernelTestBase {
/** /**
* Test cases for ::testIsDefaultRevisionPublished. * Test cases for ::testIsDefaultRevisionPublished.
*/ */
public function isDefaultRevisionPublishedTestCases() { public static function isDefaultRevisionPublishedTestCases() {
return [ return [
'Draft to draft' => [ 'Draft to draft' => [
'draft', 'draft',

View File

@ -213,7 +213,7 @@ class ModerationStateFieldItemListTest extends KernelTestBase {
/** /**
* Data provider for ::testModerationStateChanges. * Data provider for ::testModerationStateChanges.
*/ */
public function moderationStateChangesTestCases() { public static function moderationStateChangesTestCases() {
return [ return [
'Draft to draft' => [ 'Draft to draft' => [
'draft', 'draft',
@ -298,7 +298,7 @@ class ModerationStateFieldItemListTest extends KernelTestBase {
/** /**
* Test cases for ::testEntityUnserialize. * Test cases for ::testEntityUnserialize.
*/ */
public function entityUnserializeTestCases() { public static function entityUnserializeTestCases() {
return [ return [
'Default draft state' => [ 'Default draft state' => [
'draft', 'draft',
@ -332,7 +332,7 @@ class ModerationStateFieldItemListTest extends KernelTestBase {
/** /**
* Tests cases for ::testModeratedEntityWithExistingId. * Tests cases for ::testModeratedEntityWithExistingId.
*/ */
public function moderatedEntityWithExistingIdTestCases() { public static function moderatedEntityWithExistingIdTestCases() {
return [ return [
'Draft non-default state' => [ 'Draft non-default state' => [
'draft', 'draft',

View File

@ -64,7 +64,7 @@ class StateFormatterTest extends KernelTestBase {
/** /**
* Test cases for testStateFieldFormatter(). * Test cases for testStateFieldFormatter().
*/ */
public function formatterTestCases() { public static function formatterTestCases() {
return [ return [
'Draft State' => [ 'Draft State' => [
'draft', 'draft',

View File

@ -155,7 +155,7 @@ class WorkspacesContentModerationStateTest extends ContentModerationStateTest {
/** /**
* Test cases for basic moderation test. * Test cases for basic moderation test.
*/ */
public function basicModerationTestCases() { public static function basicModerationTestCases() {
return [ return [
'Nodes' => [ 'Nodes' => [
'node', 'node',

View File

@ -69,7 +69,7 @@ class ContentModerationRouteSubscriberTest extends UnitTestCase {
/** /**
* Data provider for ::testSetLatestRevisionFlag. * Data provider for ::testSetLatestRevisionFlag.
*/ */
public function setLatestRevisionFlagTestCases() { public static function setLatestRevisionFlagTestCases() {
return [ return [
'Entity parameter not on an entity form' => [ 'Entity parameter not on an entity form' => [
[], [],

View File

@ -29,7 +29,7 @@ class ContentPreprocessTest extends UnitTestCase {
/** /**
* Data provider for self::testIsLatestVersionPage(). * Data provider for self::testIsLatestVersionPage().
*/ */
public function routeNodeProvider() { public static function routeNodeProvider() {
return [ return [
['entity.node.canonical', 1, 1, FALSE, 'Not on the latest version tab route.'], ['entity.node.canonical', 1, 1, FALSE, 'Not on the latest version tab route.'],
['entity.node.latest_version', 1, 1, TRUE, 'On the latest version tab route, with the route node.'], ['entity.node.latest_version', 1, 1, TRUE, 'On the latest version tab route, with the route node.'],

View File

@ -105,7 +105,7 @@ class LatestRevisionCheckTest extends UnitTestCase {
/** /**
* Data provider for testLastAccessPermissions(). * Data provider for testLastAccessPermissions().
*/ */
public function accessSituationProvider() { public static function accessSituationProvider() {
return [ return [
// Node with global permissions and latest version. // Node with global permissions and latest version.
[Node::class, 'node', TRUE, ['view latest version', 'view any unpublished content'], FALSE, AccessResultAllowed::class], [Node::class, 'node', TRUE, ['view latest version', 'view any unpublished content'], FALSE, AccessResultAllowed::class],

View File

@ -146,7 +146,7 @@ class ModerationInformationTest extends UnitTestCase {
/** /**
* Data provider for several tests. * Data provider for several tests.
*/ */
public function providerWorkflow() { public static function providerWorkflow() {
return [ return [
[NULL, FALSE], [NULL, FALSE],
['workflow', TRUE], ['workflow', TRUE],

View File

@ -98,7 +98,7 @@ class StateTransitionValidationTest extends UnitTestCase {
/** /**
* Data provider for the user transition test. * Data provider for the user transition test.
*/ */
public function userTransitionsProvider() { public static function userTransitionsProvider() {
// The user has the right permission, so let it through. // The user has the right permission, so let it through.
$ret[] = ['draft', 'draft', 'use process transition draft', TRUE, TRUE]; $ret[] = ['draft', 'draft', 'use process transition draft', TRUE, TRUE];

View File

@ -134,7 +134,7 @@ class ContentTranslationHandlerTest extends KernelTestBase {
* An array of test cases, each one containing the element to alter, the * An array of test cases, each one containing the element to alter, the
* form state, and the expected altered element. * form state, and the expected altered element.
*/ */
public function providerTestEntityFormSharedElements() { public static function providerTestEntityFormSharedElements() {
$tests = []; $tests = [];
$element = []; $element = [];

View File

@ -25,7 +25,7 @@ class EntityTranslationSettingsTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = []; $tests = [];
// Source data when there's no entity type that uses entity translation. // Source data when there's no entity type that uses entity translation.

View File

@ -55,7 +55,7 @@ class ContentTranslationLocalTasksTest extends LocalTaskIntegrationTestBase {
/** /**
* Provides a list of routes to test. * Provides a list of routes to test.
*/ */
public function providerTestBlockAdminDisplay() { public static function providerTestBlockAdminDisplay() {
return [ return [
[ [
'entity.node.canonical', 'entity.node.canonical',

View File

@ -26,7 +26,7 @@ class ContextualUnitTest extends KernelTestBase {
* @return array[] * @return array[]
* Test cases. * Test cases.
*/ */
public function contextualLinksDataProvider(): array { public static function contextualLinksDataProvider(): array {
$tests['one group, one dynamic path argument, no metadata'] = [ $tests['one group, one dynamic path argument, no metadata'] = [
[ [
'node' => [ 'node' => [

View File

@ -272,7 +272,7 @@ class DateTimeItemTest extends FieldKernelTestBase {
/** /**
* Provider for testDatetimeValidation(). * Provider for testDatetimeValidation().
*/ */
public function datetimeValidationProvider() { public static function datetimeValidationProvider() {
return [ return [
// Valid ISO 8601 dates, but unsupported by DateTimeItem. // Valid ISO 8601 dates, but unsupported by DateTimeItem.
['2014-01-01T20:00:00Z'], ['2014-01-01T20:00:00Z'],
@ -332,7 +332,7 @@ class DateTimeItemTest extends FieldKernelTestBase {
/** /**
* Provider for testDatetimeValidation(). * Provider for testDatetimeValidation().
*/ */
public function dateOnlyValidationProvider() { public static function dateOnlyValidationProvider() {
return [ return [
// Valid date strings, but unsupported by DateTimeItem. // Valid date strings, but unsupported by DateTimeItem.
['Thu, 03 Nov 2014'], ['Thu, 03 Nov 2014'],

View File

@ -66,7 +66,7 @@ class DateFieldTest extends UnitTestCase {
/** /**
* Provides data for testDefineValueProcessPipeline(). * Provides data for testDefineValueProcessPipeline().
*/ */
public function providerTestDefineValueProcessPipeline() { public static function providerTestDefineValueProcessPipeline() {
return [ return [
[['type' => 'date'], 'Y-m-d\TH:i:s', 'Y-m-d\TH:i:s'], [['type' => 'date'], 'Y-m-d\TH:i:s', 'Y-m-d\TH:i:s'],
[['type' => 'datestamp'], 'U', 'U'], [['type' => 'datestamp'], 'U', 'U'],

View File

@ -58,7 +58,7 @@ class StandardTest extends UnitTestCase {
* *
* @see \Drupal\Tests\editor\Unit\editor\EditorXssFilter\StandardTest::testFilterXss() * @see \Drupal\Tests\editor\Unit\editor\EditorXssFilter\StandardTest::testFilterXss()
*/ */
public function providerTestFilterXss() { public static function providerTestFilterXss() {
$data = []; $data = [];
$data[] = ['<p>Hello, world!</p><unknown>Pink Fairy Armadillo</unknown>', '<p>Hello, world!</p><unknown>Pink Fairy Armadillo</unknown>']; $data[] = ['<p>Hello, world!</p><unknown>Pink Fairy Armadillo</unknown>', '<p>Hello, world!</p><unknown>Pink Fairy Armadillo</unknown>'];
$data[] = ['<p style="color:red">Hello, world!</p><unknown>Pink Fairy Armadillo</unknown>', '<p>Hello, world!</p><unknown>Pink Fairy Armadillo</unknown>']; $data[] = ['<p style="color:red">Hello, world!</p><unknown>Pink Fairy Armadillo</unknown>', '<p>Hello, world!</p><unknown>Pink Fairy Armadillo</unknown>'];
@ -580,7 +580,7 @@ xss:ex/*XSS*//*/*/pression(alert("XSS"))\'>',
* - The assertion message. * - The assertion message.
* - (optional) The disallowed HTML tags to be passed to \Drupal\Component\Utility\Xss::filter(). * - (optional) The disallowed HTML tags to be passed to \Drupal\Component\Utility\Xss::filter().
*/ */
public function providerTestBlackListMode() { public static function providerTestBlackListMode() {
return [ return [
[ [
'<unknown style="visibility:hidden">Pink Fairy Armadillo</unknown><video src="gerenuk.mp4"><script>alert(0)</script>', '<unknown style="visibility:hidden">Pink Fairy Armadillo</unknown><video src="gerenuk.mp4"><script>alert(0)</script>',

View File

@ -167,7 +167,7 @@ class NumberItemTest extends FieldKernelTestBase {
* @return \Generator * @return \Generator
* The test data. * The test data.
*/ */
public function dataNumberFieldSettingsProvider() { public static function dataNumberFieldSettingsProvider() {
yield ['integer', NULL, NULL, -100, FALSE]; yield ['integer', NULL, NULL, -100, FALSE];
yield ['integer', 0, NULL, -100, TRUE, 'field_integer: the value may be no less than 0.']; yield ['integer', 0, NULL, -100, TRUE, 'field_integer: the value may be no less than 0.'];
yield ['integer', 10, NULL, 100, FALSE]; yield ['integer', 10, NULL, 100, FALSE];
@ -243,7 +243,7 @@ class NumberItemTest extends FieldKernelTestBase {
* @return \Generator * @return \Generator
* The test data. * The test data.
*/ */
public function dataTestMinMaxValue() { public static function dataTestMinMaxValue() {
yield [1, 10, 5, FALSE, '']; yield [1, 10, 5, FALSE, ''];
yield [10, 5, 6, TRUE, 'The minimum value must be less than or equal to 5.']; yield [10, 5, 6, TRUE, 'The minimum value must be less than or equal to 5.'];
yield [1, 0, 6, TRUE, 'The minimum value must be less than or equal to 0.']; yield [1, 0, 6, TRUE, 'The minimum value must be less than or equal to 0.'];

View File

@ -26,7 +26,7 @@ class FieldInstanceLabelDescriptionTranslationTest extends MigrateSqlSourceTestB
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$test = []; $test = [];
// The source data. // The source data.

View File

@ -18,7 +18,7 @@ class FieldInstanceOptionTranslationTest extends FieldOptionTranslationTest {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$test = parent::providerSource(); $test = parent::providerSource();
// FieldInstanceOptionTranslation extends FieldOptionTranslation so the // FieldInstanceOptionTranslation extends FieldOptionTranslation so the

View File

@ -22,7 +22,7 @@ class FieldInstancePerFormDisplayTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = [ $tests = [
[ [
'source_data' => [], 'source_data' => [],

View File

@ -20,7 +20,7 @@ class FieldInstancePerViewModeTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = [ $tests = [
[ [
'source_data' => [], 'source_data' => [],

View File

@ -20,7 +20,7 @@ class FieldInstanceTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = [ $tests = [
[ [
'source_data' => [], 'source_data' => [],

View File

@ -22,7 +22,7 @@ class FieldOptionTranslationTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$test = []; $test = [];
// The source data. // The source data.

View File

@ -20,7 +20,7 @@ class FieldTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = [ $tests = [
[ [
'source_data' => [], 'source_data' => [],

View File

@ -26,7 +26,7 @@ class FieldInstanceLabelDescriptionTranslationTest extends MigrateSqlSourceTestB
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$test = []; $test = [];
// The source data. // The source data.

View File

@ -20,7 +20,7 @@ class FieldInstancePerFormDisplayTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = [ $tests = [
[ [
'source_data' => [], 'source_data' => [],

View File

@ -20,7 +20,7 @@ class FieldInstancePerViewModeTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = [ $tests = [
[ [
'source_data' => [], 'source_data' => [],

View File

@ -20,7 +20,7 @@ class FieldInstanceTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = [ $tests = [
[ [
'source_data' => [], 'source_data' => [],

View File

@ -22,7 +22,7 @@ class FieldOptionTranslationTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$test = []; $test = [];
// The source data. // The source data.

View File

@ -20,7 +20,7 @@ class FieldTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = [ $tests = [
[ [
'source_data' => [], 'source_data' => [],

View File

@ -20,7 +20,7 @@ class ViewModeTest extends MigrateSqlSourceTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function providerSource() { public static function providerSource() {
$tests = [ $tests = [
[ [
'source_data' => [], 'source_data' => [],

View File

@ -202,7 +202,7 @@ class FieldStorageConfigEntityUnitTest extends UnitTestCase {
* @return array * @return array
* Test cases. * Test cases.
*/ */
public function providerInvalidEnforcedCardinality() { public static function providerInvalidEnforcedCardinality() {
return [ return [
'zero' => [0], 'zero' => [0],
'negative_other_than_-1' => [-70], 'negative_other_than_-1' => [-70],

View File

@ -111,7 +111,7 @@ class ProcessFieldTest extends MigrateTestCase {
* - The MigrateException message to expect. * - The MigrateException message to expect.
* - Whether the field plugin is not found. * - Whether the field plugin is not found.
*/ */
public function providerTestTransform() { public static function providerTestTransform() {
return [ return [
// Tests the getFieldType() method. // Tests the getFieldType() method.
[ [

Some files were not shown because too many files have changed in this diff Show More