addPhase method
Adds a phase of its own kind, ordered against the others by
after/before, which name phases of the same kind.
Throws a NameTakenException for a name already used, and an ArgumentError for a constraint naming a phase that does not exist.
Implementation
@override
Registration addPhase(
LoopPhase phase, {
List<String> after = const <String>[],
List<String> before = const <String>[],
}) {
_named(phase.name, 'the phase', <String>[
for (final added in _store.phases) added.phase.name,
]);
final entry = TestPhase(phase, after, before, _owner);
_store.phases.add(entry);
return _track(Registration(() => _store.phases.remove(entry)));
}