@@ -115,7 +115,7 @@ void main() {
115115
116116 test (
117117 'help' ,
118- withRunner ((commandRunner, logger, printLogs) async {
118+ withRunner ((commandRunner, logger, pubUpdater, printLogs) async {
119119 final result = await commandRunner.run (['create' , '--help' ]);
120120 expect (printLogs, equals (expectedUsage));
121121 expect (result, equals (ExitCode .success.code));
@@ -136,7 +136,7 @@ void main() {
136136 test (
137137 'throws UsageException when --project-name is missing '
138138 'and directory base is not a valid package name' ,
139- withRunner ((commandRunner, logger, printLogs) async {
139+ withRunner ((commandRunner, logger, pubUpdater, printLogs) async {
140140 const expectedErrorMessage = '".tmp" is not a valid package name.\n\n '
141141 'See https://dart.dev/tools/pub/pubspec#name for more information.' ;
142142 final result = await commandRunner.run (['create' , '.tmp' ]);
@@ -147,7 +147,7 @@ void main() {
147147
148148 test (
149149 'throws UsageException when --project-name is invalid' ,
150- withRunner ((commandRunner, logger, printLogs) async {
150+ withRunner ((commandRunner, logger, pubUpdater, printLogs) async {
151151 const expectedErrorMessage = '"My App" is not a valid package name.\n\n '
152152 'See https://dart.dev/tools/pub/pubspec#name for more information.' ;
153153 final result = await commandRunner.run (
@@ -160,7 +160,7 @@ void main() {
160160
161161 test (
162162 'throws UsageException when output directory is missing' ,
163- withRunner ((commandRunner, logger, printLogs) async {
163+ withRunner ((commandRunner, logger, pubUpdater, printLogs) async {
164164 const expectedErrorMessage =
165165 'No option specified for the output directory.' ;
166166 final result = await commandRunner.run (['create' ]);
@@ -171,7 +171,7 @@ void main() {
171171
172172 test (
173173 'throws UsageException when multiple output directories are provided' ,
174- withRunner ((commandRunner, logger, printLogs) async {
174+ withRunner ((commandRunner, logger, pubUpdater, printLogs) async {
175175 const expectedErrorMessage = 'Multiple output directories specified.' ;
176176 final result = await commandRunner.run (['create' , './a' , './b' ]);
177177 expect (result, equals (ExitCode .usage.code));
@@ -322,7 +322,7 @@ void main() {
322322 test (
323323 'is a valid alias' ,
324324 withRunner (
325- (commandRunner, logger, printLogs) async {
325+ (commandRunner, logger, pubUpdater, printLogs) async {
326326 const orgName = 'com.my.org' ;
327327 final tempDir = Directory .systemTemp.createTempSync ();
328328 final result = await commandRunner.run (
@@ -347,7 +347,7 @@ void main() {
347347
348348 test (
349349 'no delimiters' ,
350- withRunner ((commandRunner, logger, printLogs) async {
350+ withRunner ((commandRunner, logger, pubUpdater, printLogs) async {
351351 const orgName = 'My App' ;
352352 final result = await commandRunner.run (
353353 ['create' , '.' , '--org-name' , orgName],
@@ -359,7 +359,7 @@ void main() {
359359
360360 test (
361361 'less than 2 domains' ,
362- withRunner ((commandRunner, logger, printLogs) async {
362+ withRunner ((commandRunner, logger, pubUpdater, printLogs) async {
363363 const orgName = 'verybadtest' ;
364364 final result = await commandRunner.run (
365365 ['create' , '.' , '--org-name' , orgName],
@@ -371,7 +371,7 @@ void main() {
371371
372372 test (
373373 'invalid characters present' ,
374- withRunner ((commandRunner, logger, printLogs) async {
374+ withRunner ((commandRunner, logger, pubUpdater, printLogs) async {
375375 const orgName = 'very%.bad@.#test' ;
376376 final result = await commandRunner.run (
377377 ['create' , '.' , '--org-name' , orgName],
@@ -383,7 +383,7 @@ void main() {
383383
384384 test (
385385 'segment starts with a non-letter' ,
386- withRunner ((commandRunner, logger, printLogs) async {
386+ withRunner ((commandRunner, logger, pubUpdater, printLogs) async {
387387 const orgName = 'very.bad.1test' ;
388388 final result = await commandRunner.run (
389389 ['create' , '.' , '--org-name' , orgName],
@@ -395,7 +395,7 @@ void main() {
395395
396396 test (
397397 'valid prefix but invalid suffix' ,
398- withRunner ((commandRunner, logger, printLogs) async {
398+ withRunner ((commandRunner, logger, pubUpdater, printLogs) async {
399399 const orgName = 'very.good.prefix.bad@@suffix' ;
400400 final result = await commandRunner.run (
401401 ['create' , '.' , '--org-name' , orgName],
@@ -498,7 +498,7 @@ void main() {
498498 group ('invalid template name' , () {
499499 test (
500500 'invalid template name' ,
501- withRunner ((commandRunner, logger, printLogs) async {
501+ withRunner ((commandRunner, logger, pubUpdater, printLogs) async {
502502 const templateName = 'badtemplate' ;
503503 const expectedErrorMessage =
504504 '''"$templateName " is not an allowed value for option "template".''' ;
0 commit comments