Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295674

[PHPUnit 10] Provide a static alternative to ConfigMapperManagerTest::providerTestHasTranslatable

$
0
0

Problem/Motivation

PHPUnit 10 deprecates use of non-static @dataProvider methods. This means that @dataProvider methods can no longer make calls to non-static methods. Any non-static call ($this->someMethod()) needs to be replaced by a call to a static alternative (static::someOtherMethod()), that would have to be implemented if not available.

In this issue, focus on replacing ConfigMapperManagerTest::providerTestHasTranslatable()

Proposed resolution

I cannot find an easy way to use PHPUnit mocks in data providers when they're static. Here I suggest to convers usage of a PHPUnit mocks to PHPSpec prophecies instead.

Let's see how this goes and then work on others.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 295674


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>