This is just a minor followup postponed on the resolution of #2549075: flag reset UI has no tests

Currently some tests for the 'flag.count' service - \Drupal\flag\FlagCountManager
are intermingled with tests for the 'flag' service - \Drupal\flag\FlagService

Once the parent lands - I want to copy and paste the FlagService test code into FlagServiceTest....

Also with this separation the name FlagCountsTest.php seems to break the principle of least surprise.
More meaning is conveyed in a name like.....FlagCountManagerTest.php

Comments

martin107 created an issue. See original summary.

martin107’s picture

Status: Active » Postponed
martin107’s picture

Assigned: martin107 » Unassigned
Status: Postponed » Closed (works as designed)

Ahem, OK time to deflate this trial balloon

Sorry for the noise....

TLDR

From https://www.drupal.org/node/2549075#comment-10211719

Another thing I am toying with, that I don't like, is the fact that I had to use specialist knowledge of our test code base - to know where the other flag rest test code was.

My specialist knowledge can be reduced to knowing that is the test that will blow up if you mess with flagService::reset()!

It a welcome BUT fringe benefit there in no way to separate out the test - reset() is just helpful in testing other stuff.

In short lets keep everything exactly as they are.