File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed
Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ class CodebaseEnvironmentResponse
2020
2121 public string $ code_switch_status ;
2222
23+ public string $ ssh_url ;
24+
2325 public object $ flags ;
2426
2527 /**
@@ -41,6 +43,7 @@ public function __construct(object $environment)
4143 $ this ->status = $ environment ->status ;
4244 $ this ->reference = $ environment ->reference ;
4345 $ this ->code_switch_status = $ environment ->code_switch_status ?? 'IDLE ' ;
46+ $ this ->ssh_url = $ environment ->ssh_url ?? '' ;
4447 $ this ->flags = $ environment ->flags ;
4548 $ this ->properties = (array ) ($ environment ->properties ?? []);
4649
Original file line number Diff line number Diff line change @@ -305,5 +305,21 @@ public function testCodebaseEnvironmentResponseEdgeCases(): void
305305
306306 $ response7 = new CodebaseEnvironmentResponse ($ environmentWithCodeSwitchStatus );
307307 $ this ->assertEquals ('RUNNING ' , $ response7 ->code_switch_status );
308+ // Test code_switch_status with explicit value
309+ $ environmentWithSshUrl = (object ) [
310+ '_links ' => (object ) ['self ' => (object ) ['href ' => 'https://example.com ' ]],
311+ 'id ' => 'env-7 ' ,
312+ 'name ' => 'dev4 ' ,
313+ 'label ' => 'Dev4 ' ,
314+ 'description ' => 'Development Environment 4 ' ,
315+ 'status ' => 'normal ' ,
316+ 'reference ' => 'develop ' ,
317+ 'flags ' => (object ) ['production ' => false ],
318+ 'code_switch_status ' => 'RUNNING ' ,
319+ 'ssh_url ' => 'ideapp.dev01@ideappdev01.ssh.gardens.acquia-sites.com '
320+ ];
321+
322+ $ response8 = new CodebaseEnvironmentResponse ($ environmentWithSshUrl );
323+ $ this ->assertEquals ('ideapp.dev01@ideappdev01.ssh.gardens.acquia-sites.com ' , $ response8 ->ssh_url );
308324 }
309325}
You can’t perform that action at this time.
0 commit comments