Updated: Comment #0
Problem/Motivation
BatchStorage class has calls to procedural code which make it difficult to unit test.
In relation to API freeze, refactoring stuff, leaving the wrappers, and marking the wrappers deprecated should be fine.
Proposed resolution
Goal: Make BatchStorage unit testable.
By:
Inject the dependecies and mock
for example:
drupal_get_token()
should be replaced with a call to Crypt::hmacBase64()
since drupal_get_token is just a wrapper to call that method.
Remaining tasks
- check other procedural calls and identify which are wrappers
- mock the database, #2002116: Convert core/modules/update/lib/Drupal/update/Tests/UpdateCoreUnitTest.php to phpunit has an example of a mock, also see: http://phpunit.de/manual/3.7/en/test-doubles.html
- more TBD
User interface changes
No.
API changes
TBD (no?)