Problem/Motivation
The MigrateProcessTestCase base class defines the protected $row property as \Drupal\migrate\Row variable type. Later in the code, the variable is mocked as migrate row and thus has also to be typed as \PHPUnit\Framework\MockObject\MockObject.
Steps to reproduce
- Check code of
Drupal\Tests\migrate\Unit\process\MigrateProcessTestCaseor run a static code analysis for that class
Proposed resolution
- Define variable type hinting as
\Drupal\migrate\MigrateExecutable|\PHPUnit\Framework\MockObject\MockObject
Remaining tasks
- Done: Fix variable type
User interface changes
n/a
API changes
n/a
Data model changes
n/a
Release notes snippet
Use correct variable type hint for $row property of Drupal\Tests\migrate\Unit\process\MigrateProcessTestCase
Issue fork drupal-3203265
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
hctomPlease review the issue fork for the necessary change.
Comment #3
hctomComment #5
quietone commentedYes, the hint is missing the mock part. This change is correct.
@htcom, thanks!
Comment #8
catchCommitted/pushed to 9.2.x and cherry-picked to 9.1.x, thanks!