Issue #3351089 by Spokje: Fix PHPStan L1 errors "@dataProvider Foo related method not found."

merge-requests/3590/head
Dave Long 2023-04-11 18:46:51 +01:00
parent bef31d1d77
commit 85aee30af3
No known key found for this signature in database
GPG Key ID: ED52AE211E142771
8 changed files with 15 additions and 55 deletions

View File

@ -15,7 +15,7 @@ class LogTest extends MigrateProcessTestCase {
/**
* Tests the Log plugin.
*
* @dataProvider providerTestLog()
* @dataProvider providerTestLog
*/
public function testLog($value, $expected_message) {
// Test the expected log message.

View File

@ -280,7 +280,7 @@ class MigrateUserRoleTest extends MigrateDrupal6TestBase {
* contains the source role id, an array of valid permissions and an array
* of invalid permissions.
*
* @dataProvider providerTestUserRole()
* @dataProvider providerTestUserRole
*/
public function testUserRole(array $modules, array $migrations, array $role_data) {
if ($modules) {

View File

@ -1850,11 +1850,6 @@ parameters:
count: 1
path: modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php
-
message: "#^@dataProvider providerTestLog\\(\\) related method not found\\.$#"
count: 1
path: modules/migrate/tests/src/Unit/process/LogTest.php
-
message: "#^Variable \\$sub_process_plugins might not be defined\\.$#"
count: 2
@ -2705,11 +2700,6 @@ parameters:
count: 1
path: modules/user/tests/src/Functional/Views/UserChangedTest.php
-
message: "#^@dataProvider providerTestUserRole\\(\\) related method not found\\.$#"
count: 1
path: modules/user/tests/src/Kernel/Migrate/d6/MigrateUserRoleTest.php
-
message: "#^Variable \\$result in isset\\(\\) always exists and is not nullable\\.$#"
count: 1
@ -3520,11 +3510,6 @@ parameters:
count: 1
path: tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php
-
message: "#^@dataProvider providerTestValidateHex\\(\\) related method not found\\.$#"
count: 1
path: tests/Drupal/Tests/Component/Utility/ColorTest.php
-
message: "#^@coversDefaultClass defined on class method testHtmlClass\\.$#"
count: 1
@ -3575,11 +3560,6 @@ parameters:
count: 1
path: tests/Drupal/Tests/Core/Asset/LibraryDiscoveryCollectorTest.php
-
message: "#^@dataProvider providerTestGetMachineNameSuggestion\\(\\) related method not found\\.$#"
count: 1
path: tests/Drupal/Tests/Core/Block/BlockBaseTest.php
-
message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#"
count: 1
@ -3645,16 +3625,6 @@ parameters:
count: 1
path: tests/Drupal/Tests/Core/Controller/TitleResolverTest.php
-
message: "#^@dataProvider dataProviderTestCompileWithKnownOperators\\(\\) related method not found\\.$#"
count: 1
path: tests/Drupal/Tests/Core/Database/ConditionTest.php
-
message: "#^@dataProvider providerSimpleCondition\\(\\) related method not found\\.$#"
count: 1
path: tests/Drupal/Tests/Core/Database/ConditionTest.php
-
message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#"
count: 1
@ -3680,11 +3650,6 @@ parameters:
count: 1
path: tests/Drupal/Tests/Core/Database/OrderByTest.php
-
message: "#^@dataProvider providerTestExceptionMessage\\(\\) related method not found\\.$#"
count: 1
path: tests/Drupal/Tests/Core/Database/RowCountExceptionTest.php
-
message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#"
count: 1
@ -3730,11 +3695,6 @@ parameters:
count: 1
path: tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php
-
message: "#^@dataProvider providerTestGetTableMappingSimple\\(\\) related method not found\\.$#"
count: 8
path: tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageTest.php
-
message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#"
count: 1

View File

@ -20,7 +20,7 @@ class ColorTest extends TestCase {
* @param string $value
* The hex color value.
*
* @dataProvider providerTestValidateHex()
* @dataProvider providerTestValidateHex
*/
public function testValidateHex($expected, $value) {
$this->assertSame($expected, Color::validateHex($value));

View File

@ -21,7 +21,7 @@ class BlockBaseTest extends UnitTestCase {
* @param string $expected
* The expected machine name.
*
* @dataProvider providerTestGetMachineNameSuggestion()
* @dataProvider providerTestGetMachineNameSuggestion
*/
public function testGetMachineNameSuggestion($label, $expected) {
$module_handler = $this->createMock('Drupal\Core\Extension\ModuleHandlerInterface');

View File

@ -33,7 +33,7 @@ class ConditionTest extends UnitTestCase {
/**
* @covers ::compile
* @dataProvider providerSimpleCondition()
* @dataProvider providerSimpleCondition
*/
public function testSimpleCondition($expected, $field_name) {
$connection = $this->prophesize(Connection::class);
@ -64,7 +64,7 @@ class ConditionTest extends UnitTestCase {
/**
* @covers ::compile
*
* @dataProvider dataProviderTestCompileWithKnownOperators()
* @dataProvider dataProviderTestCompileWithKnownOperators
*
* @param string $expected
* The expected generated SQL condition.

View File

@ -31,7 +31,7 @@ class RowCountExceptionTest extends UnitTestCase {
/**
* @covers ::__construct
* @dataProvider providerTestExceptionMessage()
* @dataProvider providerTestExceptionMessage
*/
public function testExceptionMessage($expected, $message) {
$e = new RowCountException($message);

View File

@ -472,7 +472,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
* @covers ::__construct
* @covers ::getTableMapping
*
* @dataProvider providerTestGetTableMappingSimple()
* @dataProvider providerTestGetTableMappingSimple
*/
public function testGetTableMappingSimple(array $entity_keys) {
$this->entityType->expects($this->any())
@ -504,7 +504,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
* @covers ::__construct
* @covers ::getTableMapping
*
* @dataProvider providerTestGetTableMappingSimple()
* @dataProvider providerTestGetTableMappingSimple
*/
public function testGetTableMappingSimpleWithFields(array $entity_keys) {
$base_field_names = ['title', 'description', 'owner'];
@ -579,7 +579,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
* @covers ::__construct
* @covers ::getTableMapping
*
* @dataProvider providerTestGetTableMappingSimple()
* @dataProvider providerTestGetTableMappingSimple
*/
public function testGetTableMappingRevisionable(array $entity_keys) {
// This allows to re-use the data provider.
@ -630,7 +630,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
* @covers ::__construct
* @covers ::getTableMapping
*
* @dataProvider providerTestGetTableMappingSimple()
* @dataProvider providerTestGetTableMappingSimple
*/
public function testGetTableMappingRevisionableWithFields(array $entity_keys) {
// This allows to re-use the data provider.
@ -708,7 +708,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
* @covers ::__construct
* @covers ::getTableMapping
*
* @dataProvider providerTestGetTableMappingSimple()
* @dataProvider providerTestGetTableMappingSimple
*/
public function testGetTableMappingTranslatable(array $entity_keys) {
// This allows to re-use the data provider.
@ -764,7 +764,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
* @covers ::__construct
* @covers ::getTableMapping
*
* @dataProvider providerTestGetTableMappingSimple()
* @dataProvider providerTestGetTableMappingSimple
*/
public function testGetTableMappingTranslatableWithFields(array $entity_keys) {
// This allows to re-use the data provider.
@ -824,7 +824,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
* @covers ::__construct
* @covers ::getTableMapping
*
* @dataProvider providerTestGetTableMappingSimple()
* @dataProvider providerTestGetTableMappingSimple
*/
public function testGetTableMappingRevisionableTranslatable(array $entity_keys) {
// This allows to re-use the data provider.
@ -935,7 +935,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
* @covers ::__construct
* @covers ::getTableMapping
*
* @dataProvider providerTestGetTableMappingSimple()
* @dataProvider providerTestGetTableMappingSimple
*/
public function testGetTableMappingRevisionableTranslatableWithFields(array $entity_keys) {
// This allows to re-use the data provider.