Fix/set mocks defaults (#54756)

This commit is contained in:
kwkr
2020-04-20 21:20:03 +02:00
committed by GitHub
parent 6a490ed497
commit d21ab5184a
8 changed files with 97 additions and 14 deletions

View File

@@ -145,6 +145,15 @@ Future<void> expectToolExitLater(Future<dynamic> future, Matcher messageMatcher)
}
}
Matcher containsIgnoringWhitespace(String toSearch) {
return predicate(
(String source) {
return collapseWhitespace(source).contains(collapseWhitespace(toSearch));
},
'contains "$toSearch" ignoring whitespace.',
);
}
/// Executes a test body in zone that does not allow context-based injection.
///
/// For classes which have been refactored to excluded context-based injection