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

Declare dependencies in BatchStorage and test with phpunit tests

$
0
0

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

User interface changes

No.

API changes

TBD (no?)


Viewing all articles
Browse latest Browse all 294902

Trending Articles



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