terminus
terminus copied to clipboard
Add functional test for connection mode change verifying correct model information
Expected behavior
- call \Pantheon\Terminus\Models\Environment::changeConnectionMode($mode)
- \Pantheon\Terminus\Models\Environment::get("connection_mode")
- expect ::get to return $mode
Actual behavior
- ::get returns previous mode, even when connection mode was successfully changed remotely
Steps to reproduce the behavior
- Implement a new terminus command in which connection mode is changed from sftp to git, and back to sftp (or vice versa).
- The "change back" function fails, because the Environment model property has not been updated
Not sure if it's appropriate to set the property inside of ::changeConnectionMode, or use a callback to change it upon resolution of the sub-process.