Page MenuHomePhabricator

Get rid of get[Formatter|Parser]Class methods in tests
Closed, ResolvedPublic

Description

Actual problems with these methods:

  • Hiding class names in strings and relying on PHP's dark magic to turn strings into objects makes it hard to find usages of these classes.
  • Abstract base classes for tests are considered evil. These patches are a step towards getting rid of the abstract base classes.
  • It's just not necessary. Just override the getInstance method. Done. This is sooo much simpler.

SerializerBaseTest::getClass patches:

ValueFormatterTestBase::getFormatterClass base patch:

ValueParserTestBase::getParserClass patches:

Event Timeline

thiemowmde claimed this task.
thiemowmde raised the priority of this task from to Unbreak Now!.
thiemowmde updated the task description. (Show Details)
thiemowmde added projects: Wikidata, DataValues.
thiemowmde subscribed.
Tobi_WMDE_SW lowered the priority of this task from Unbreak Now! to Medium.Mar 11 2015, 9:51 AM
daniel updated the task description. (Show Details)
daniel subscribed.

all listed changes were merged