File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -621,7 +621,7 @@ public function getPrimaryDomainModel()
621621 */
622622 public function getDrushVersion ()
623623 {
624- return $ this ->settings ('drush_version ' ) ;
624+ return $ this ->settings ('appserver_runtime ' )-> drush_version ;
625625 }
626626
627627 /**
@@ -957,6 +957,7 @@ public function serialize()
957957 'initialized ' => $ this ->isInitialized (),
958958 'connection_mode ' => $ this ->get ('connection_mode ' ),
959959 'php_version ' => $ this ->getPHPVersion (),
960+ 'drush_version ' => $ this ->getDrushVersion (),
960961 'php_runtime_generation ' => $ this ->getPHPRuntimeGeneration (),
961962 ];
962963 }
Original file line number Diff line number Diff line change @@ -317,6 +317,29 @@ public function testInfoCommand()
317317 );
318318 }
319319
320+ /**
321+ * @test
322+ * @covers \Pantheon\Terminus\Commands\Env\InfoCommand
323+ *
324+ * @group env
325+ * @group short
326+ */
327+ public function testInfoCommandWithDrushVersion ()
328+ {
329+ $ envInfo = $ this ->terminusJsonResponse (
330+ sprintf ('env:info %s --field=drush_version ' , $ this ->getSiteEnv ())
331+ );
332+ $ this ->assertArrayHasKey (
333+ 'drush_version ' ,
334+ $ envInfo ,
335+ 'Environment info should have "drush_version" field when explicitly requested. '
336+ );
337+ $ this ->assertNotEmpty (
338+ $ envInfo ['drush_version ' ],
339+ 'Environment info "drush_version" should not be empty. '
340+ );
341+ }
342+
320343 /**
321344 * @test
322345 * @covers \Pantheon\Terminus\Commands\Env\MetricsCommand
You can’t perform that action at this time.
0 commit comments