Issue #3351089 by Spokje: Fix PHPStan L1 errors "@dataProvider Foo related method not found."
parent
bef31d1d77
commit
85aee30af3
|
@ -15,7 +15,7 @@ class LogTest extends MigrateProcessTestCase {
|
||||||
/**
|
/**
|
||||||
* Tests the Log plugin.
|
* Tests the Log plugin.
|
||||||
*
|
*
|
||||||
* @dataProvider providerTestLog()
|
* @dataProvider providerTestLog
|
||||||
*/
|
*/
|
||||||
public function testLog($value, $expected_message) {
|
public function testLog($value, $expected_message) {
|
||||||
// Test the expected log message.
|
// Test the expected log message.
|
||||||
|
|
|
@ -280,7 +280,7 @@ class MigrateUserRoleTest extends MigrateDrupal6TestBase {
|
||||||
* contains the source role id, an array of valid permissions and an array
|
* contains the source role id, an array of valid permissions and an array
|
||||||
* of invalid permissions.
|
* of invalid permissions.
|
||||||
*
|
*
|
||||||
* @dataProvider providerTestUserRole()
|
* @dataProvider providerTestUserRole
|
||||||
*/
|
*/
|
||||||
public function testUserRole(array $modules, array $migrations, array $role_data) {
|
public function testUserRole(array $modules, array $migrations, array $role_data) {
|
||||||
if ($modules) {
|
if ($modules) {
|
||||||
|
|
|
@ -1850,11 +1850,6 @@ parameters:
|
||||||
count: 1
|
count: 1
|
||||||
path: modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php
|
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\\.$#"
|
message: "#^Variable \\$sub_process_plugins might not be defined\\.$#"
|
||||||
count: 2
|
count: 2
|
||||||
|
@ -2705,11 +2700,6 @@ parameters:
|
||||||
count: 1
|
count: 1
|
||||||
path: modules/user/tests/src/Functional/Views/UserChangedTest.php
|
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\\.$#"
|
message: "#^Variable \\$result in isset\\(\\) always exists and is not nullable\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
@ -3520,11 +3510,6 @@ parameters:
|
||||||
count: 1
|
count: 1
|
||||||
path: tests/Drupal/Tests/Component/Plugin/Factory/ReflectionFactoryTest.php
|
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\\.$#"
|
message: "#^@coversDefaultClass defined on class method testHtmlClass\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
@ -3575,11 +3560,6 @@ parameters:
|
||||||
count: 1
|
count: 1
|
||||||
path: tests/Drupal/Tests/Core/Asset/LibraryDiscoveryCollectorTest.php
|
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\\.$#"
|
message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
@ -3645,16 +3625,6 @@ parameters:
|
||||||
count: 1
|
count: 1
|
||||||
path: tests/Drupal/Tests/Core/Controller/TitleResolverTest.php
|
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\\.$#"
|
message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
@ -3680,11 +3650,6 @@ parameters:
|
||||||
count: 1
|
count: 1
|
||||||
path: tests/Drupal/Tests/Core/Database/OrderByTest.php
|
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\\.$#"
|
message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
@ -3730,11 +3695,6 @@ parameters:
|
||||||
count: 1
|
count: 1
|
||||||
path: tests/Drupal/Tests/Core/Entity/Sql/SqlContentEntityStorageSchemaTest.php
|
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\\.$#"
|
message: "#^Missing call to parent\\:\\:setUp\\(\\) method\\.$#"
|
||||||
count: 1
|
count: 1
|
||||||
|
|
|
@ -20,7 +20,7 @@ class ColorTest extends TestCase {
|
||||||
* @param string $value
|
* @param string $value
|
||||||
* The hex color value.
|
* The hex color value.
|
||||||
*
|
*
|
||||||
* @dataProvider providerTestValidateHex()
|
* @dataProvider providerTestValidateHex
|
||||||
*/
|
*/
|
||||||
public function testValidateHex($expected, $value) {
|
public function testValidateHex($expected, $value) {
|
||||||
$this->assertSame($expected, Color::validateHex($value));
|
$this->assertSame($expected, Color::validateHex($value));
|
||||||
|
|
|
@ -21,7 +21,7 @@ class BlockBaseTest extends UnitTestCase {
|
||||||
* @param string $expected
|
* @param string $expected
|
||||||
* The expected machine name.
|
* The expected machine name.
|
||||||
*
|
*
|
||||||
* @dataProvider providerTestGetMachineNameSuggestion()
|
* @dataProvider providerTestGetMachineNameSuggestion
|
||||||
*/
|
*/
|
||||||
public function testGetMachineNameSuggestion($label, $expected) {
|
public function testGetMachineNameSuggestion($label, $expected) {
|
||||||
$module_handler = $this->createMock('Drupal\Core\Extension\ModuleHandlerInterface');
|
$module_handler = $this->createMock('Drupal\Core\Extension\ModuleHandlerInterface');
|
||||||
|
|
|
@ -33,7 +33,7 @@ class ConditionTest extends UnitTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::compile
|
* @covers ::compile
|
||||||
* @dataProvider providerSimpleCondition()
|
* @dataProvider providerSimpleCondition
|
||||||
*/
|
*/
|
||||||
public function testSimpleCondition($expected, $field_name) {
|
public function testSimpleCondition($expected, $field_name) {
|
||||||
$connection = $this->prophesize(Connection::class);
|
$connection = $this->prophesize(Connection::class);
|
||||||
|
@ -64,7 +64,7 @@ class ConditionTest extends UnitTestCase {
|
||||||
/**
|
/**
|
||||||
* @covers ::compile
|
* @covers ::compile
|
||||||
*
|
*
|
||||||
* @dataProvider dataProviderTestCompileWithKnownOperators()
|
* @dataProvider dataProviderTestCompileWithKnownOperators
|
||||||
*
|
*
|
||||||
* @param string $expected
|
* @param string $expected
|
||||||
* The expected generated SQL condition.
|
* The expected generated SQL condition.
|
||||||
|
|
|
@ -31,7 +31,7 @@ class RowCountExceptionTest extends UnitTestCase {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @dataProvider providerTestExceptionMessage()
|
* @dataProvider providerTestExceptionMessage
|
||||||
*/
|
*/
|
||||||
public function testExceptionMessage($expected, $message) {
|
public function testExceptionMessage($expected, $message) {
|
||||||
$e = new RowCountException($message);
|
$e = new RowCountException($message);
|
||||||
|
|
|
@ -472,7 +472,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getTableMapping
|
* @covers ::getTableMapping
|
||||||
*
|
*
|
||||||
* @dataProvider providerTestGetTableMappingSimple()
|
* @dataProvider providerTestGetTableMappingSimple
|
||||||
*/
|
*/
|
||||||
public function testGetTableMappingSimple(array $entity_keys) {
|
public function testGetTableMappingSimple(array $entity_keys) {
|
||||||
$this->entityType->expects($this->any())
|
$this->entityType->expects($this->any())
|
||||||
|
@ -504,7 +504,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getTableMapping
|
* @covers ::getTableMapping
|
||||||
*
|
*
|
||||||
* @dataProvider providerTestGetTableMappingSimple()
|
* @dataProvider providerTestGetTableMappingSimple
|
||||||
*/
|
*/
|
||||||
public function testGetTableMappingSimpleWithFields(array $entity_keys) {
|
public function testGetTableMappingSimpleWithFields(array $entity_keys) {
|
||||||
$base_field_names = ['title', 'description', 'owner'];
|
$base_field_names = ['title', 'description', 'owner'];
|
||||||
|
@ -579,7 +579,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getTableMapping
|
* @covers ::getTableMapping
|
||||||
*
|
*
|
||||||
* @dataProvider providerTestGetTableMappingSimple()
|
* @dataProvider providerTestGetTableMappingSimple
|
||||||
*/
|
*/
|
||||||
public function testGetTableMappingRevisionable(array $entity_keys) {
|
public function testGetTableMappingRevisionable(array $entity_keys) {
|
||||||
// This allows to re-use the data provider.
|
// This allows to re-use the data provider.
|
||||||
|
@ -630,7 +630,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getTableMapping
|
* @covers ::getTableMapping
|
||||||
*
|
*
|
||||||
* @dataProvider providerTestGetTableMappingSimple()
|
* @dataProvider providerTestGetTableMappingSimple
|
||||||
*/
|
*/
|
||||||
public function testGetTableMappingRevisionableWithFields(array $entity_keys) {
|
public function testGetTableMappingRevisionableWithFields(array $entity_keys) {
|
||||||
// This allows to re-use the data provider.
|
// This allows to re-use the data provider.
|
||||||
|
@ -708,7 +708,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getTableMapping
|
* @covers ::getTableMapping
|
||||||
*
|
*
|
||||||
* @dataProvider providerTestGetTableMappingSimple()
|
* @dataProvider providerTestGetTableMappingSimple
|
||||||
*/
|
*/
|
||||||
public function testGetTableMappingTranslatable(array $entity_keys) {
|
public function testGetTableMappingTranslatable(array $entity_keys) {
|
||||||
// This allows to re-use the data provider.
|
// This allows to re-use the data provider.
|
||||||
|
@ -764,7 +764,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getTableMapping
|
* @covers ::getTableMapping
|
||||||
*
|
*
|
||||||
* @dataProvider providerTestGetTableMappingSimple()
|
* @dataProvider providerTestGetTableMappingSimple
|
||||||
*/
|
*/
|
||||||
public function testGetTableMappingTranslatableWithFields(array $entity_keys) {
|
public function testGetTableMappingTranslatableWithFields(array $entity_keys) {
|
||||||
// This allows to re-use the data provider.
|
// This allows to re-use the data provider.
|
||||||
|
@ -824,7 +824,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getTableMapping
|
* @covers ::getTableMapping
|
||||||
*
|
*
|
||||||
* @dataProvider providerTestGetTableMappingSimple()
|
* @dataProvider providerTestGetTableMappingSimple
|
||||||
*/
|
*/
|
||||||
public function testGetTableMappingRevisionableTranslatable(array $entity_keys) {
|
public function testGetTableMappingRevisionableTranslatable(array $entity_keys) {
|
||||||
// This allows to re-use the data provider.
|
// This allows to re-use the data provider.
|
||||||
|
@ -935,7 +935,7 @@ class SqlContentEntityStorageTest extends UnitTestCase {
|
||||||
* @covers ::__construct
|
* @covers ::__construct
|
||||||
* @covers ::getTableMapping
|
* @covers ::getTableMapping
|
||||||
*
|
*
|
||||||
* @dataProvider providerTestGetTableMappingSimple()
|
* @dataProvider providerTestGetTableMappingSimple
|
||||||
*/
|
*/
|
||||||
public function testGetTableMappingRevisionableTranslatableWithFields(array $entity_keys) {
|
public function testGetTableMappingRevisionableTranslatableWithFields(array $entity_keys) {
|
||||||
// This allows to re-use the data provider.
|
// This allows to re-use the data provider.
|
||||||
|
|
Loading…
Reference in New Issue