-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Tests] Migrate tests to static data providers #49288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,27 +53,27 @@ public function testDescribeApplication(Application $application, $expectedDescr | |
|
||
public static function getDescribeInputArgumentTestData() | ||
{ | ||
return static::getDescriptionTestData(ObjectsProvider::getInputArguments()); | ||
return self::getDescriptionTestData(ObjectsProvider::getInputArguments()); | ||
} | ||
|
||
public static function getDescribeInputOptionTestData() | ||
{ | ||
return static::getDescriptionTestData(ObjectsProvider::getInputOptions()); | ||
return self::getDescriptionTestData(ObjectsProvider::getInputOptions()); | ||
} | ||
|
||
public static function getDescribeInputDefinitionTestData() | ||
{ | ||
return static::getDescriptionTestData(ObjectsProvider::getInputDefinitions()); | ||
return self::getDescriptionTestData(ObjectsProvider::getInputDefinitions()); | ||
} | ||
|
||
public static function getDescribeCommandTestData() | ||
{ | ||
return static::getDescriptionTestData(ObjectsProvider::getCommands()); | ||
return self::getDescriptionTestData(ObjectsProvider::getCommands()); | ||
} | ||
|
||
public static function getDescribeApplicationTestData() | ||
{ | ||
return static::getDescriptionTestData(ObjectsProvider::getApplications()); | ||
return self::getDescriptionTestData(ObjectsProvider::getApplications()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It isn't. It works here because the method is currently not overridden. But it would definitely cause some problems if it's overridden one day. I addressed both your comments in #49328, thank you very much for letting me know! I'll be cautious next time with this 👍 |
||
} | ||
|
||
abstract protected function getDescriptor(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The right type here is
MockObject&DumpDataCollector
actually. PHPUnit does not make the MockObject interface generic.