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

TwigExtensionTest::testFormatDate() doesn't make much sense

$
0
0

Problem/Motivation

That test uses its own mock date formatter (with wrong arguments), it could just as well use the actual date string that it expects.

Also strange that time doesn't seem to be defined at all, would make more sense to explicityl define that and also explicitly assert the received arguments in the mocked method.

Proposed resolution

Hardcode the expected result, pass ['time' => $timestamp] as second argument to render() so it more closely reflects a real call.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 296414

Trending Articles