1717
1818namespace Google \Cloud \Dev \Tests \Unit \Command ;
1919
20- use Google \Cloud \Dev \Command \ComponentUpdateGencodeCommand ;
20+ use Google \Cloud \Dev \Command \ComponentUpdateCommand ;
2121use Google \Cloud \Dev \RunProcess ;
2222use PHPUnit \Framework \TestCase ;
2323use Prophecy \PhpUnit \ProphecyTrait ;
2828/**
2929 * @group dev
3030 */
31- class ComponentUpdateGencodeCommandTest extends TestCase
31+ class ComponentUpdateCommandTest extends TestCase
3232{
3333 use ProphecyTrait;
3434
@@ -55,8 +55,8 @@ public static function setUpBeforeClass(): void
5555 ],
5656 ]));
5757 $ application = new Application ();
58- $ application ->add (new ComponentUpdateGencodeCommand (self ::$ tmpDir ));
59- self ::$ commandTester = new CommandTester ($ application ->get ('component:update:gencode ' ));
58+ $ application ->add (new ComponentUpdateCommand (self ::$ tmpDir ));
59+ self ::$ commandTester = new CommandTester ($ application ->get ('component:update ' ));
6060 }
6161
6262 public static function tearDownAfterClass (): void
@@ -76,8 +76,8 @@ public function testUpdateFailsWithInvalidGoogleapisDir()
7676
7777 $ googleapisGenPath = '/path/to/googleapis-gen ' ;
7878 $ application = new Application ();
79- $ application ->add (new ComponentUpdateGencodeCommand (self ::$ tmpDir ));
80- $ commandTester = new CommandTester ($ application ->get ('component:update:gencode ' ));
79+ $ application ->add (new ComponentUpdateCommand (self ::$ tmpDir ));
80+ $ commandTester = new CommandTester ($ application ->get ('component:update ' ));
8181
8282 $ commandTester ->execute ([
8383 'component ' => self ::COMPONENT_NAME ,
@@ -96,8 +96,8 @@ public function testUpdateFailsWithNoDocker()
9696 ->willReturn ('' );
9797
9898 $ application = new Application ();
99- $ application ->add (new ComponentUpdateGencodeCommand (self ::$ tmpDir , $ runProcess ->reveal ()));
100- $ commandTester = new CommandTester ($ application ->get ('component:update:gencode ' ));
99+ $ application ->add (new ComponentUpdateCommand (self ::$ tmpDir , $ runProcess ->reveal ()));
100+ $ commandTester = new CommandTester ($ application ->get ('component:update ' ));
101101
102102 $ commandTester ->execute ([
103103 'component ' => self ::COMPONENT_NAME ,
@@ -116,8 +116,8 @@ public function testUpdateFailsWithInvalidComponentName()
116116 ->willReturn ('/path/to/docker ' );
117117
118118 $ application = new Application ();
119- $ application ->add (new ComponentUpdateGencodeCommand (self ::$ tmpDir , $ runProcess ->reveal ()));
120- $ commandTester = new CommandTester ($ application ->get ('component:update:gencode ' ));
119+ $ application ->add (new ComponentUpdateCommand (self ::$ tmpDir , $ runProcess ->reveal ()));
120+ $ commandTester = new CommandTester ($ application ->get ('component:update ' ));
121121
122122 $ commandTester ->execute ([
123123 'component ' => 'NonExistantComponent ' ,
@@ -185,9 +185,9 @@ public function testUpdateComponentSucceeds()
185185 ->willReturn ('' );
186186
187187 $ application = new Application ();
188- $ application ->add (new ComponentUpdateGencodeCommand (self ::$ tmpDir , $ runProcess ->reveal ()));
188+ $ application ->add (new ComponentUpdateCommand (self ::$ tmpDir , $ runProcess ->reveal ()));
189189
190- $ commandTester = new CommandTester ($ application ->get ('component:update:gencode ' ));
190+ $ commandTester = new CommandTester ($ application ->get ('component:update ' ));
191191
192192 $ commandTester ->execute ([
193193 'component ' => self ::COMPONENT_NAME ,
@@ -206,9 +206,9 @@ public function testUpdateComponentErrorsWithNonNumericTimeout()
206206 $ this ->expectExceptionMessage ('Error: The timeout option must be a positive integer ' );
207207
208208 $ application = new Application ();
209- $ application ->add (new ComponentUpdateGencodeCommand (self ::$ tmpDir ));
209+ $ application ->add (new ComponentUpdateCommand (self ::$ tmpDir ));
210210
211- $ commandTester = new CommandTester ($ application ->get ('component:update:gencode ' ));
211+ $ commandTester = new CommandTester ($ application ->get ('component:update ' ));
212212 $ commandTester ->setInputs ([
213213 'Y ' // Does this information look correct? [Y/n]
214214 ]);
0 commit comments