@@ -67,12 +67,12 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function getBaseFolder(); |
69 | 69 | |
70 | - /** |
|
71 | - * how do we validate any host adapters used by hosts in this group? |
|
72 | - * |
|
73 | - * @return HostAdapterValidator |
|
74 | - */ |
|
75 | - public function getHostAdapterValidator(); |
|
70 | + /** |
|
71 | + * how do we validate any host adapters used by hosts in this group? |
|
72 | + * |
|
73 | + * @return HostAdapterValidator |
|
74 | + */ |
|
75 | + public function getHostAdapterValidator(); |
|
76 | 76 | |
77 | 77 | /** |
78 | 78 | * what type of group are we? |
@@ -82,5 +82,5 @@ discard block |
||
82 | 82 | * |
83 | 83 | * @return string |
84 | 84 | */ |
85 | - public function getType(); |
|
85 | + public function getType(); |
|
86 | 86 | } |
87 | 87 | \ No newline at end of file |
@@ -61,15 +61,15 @@ |
||
61 | 61 | |
62 | 62 | interface HostAdapter |
63 | 63 | { |
64 | - /** |
|
65 | - * create an empty host definition for this kind of host |
|
66 | - * |
|
67 | - * @param TestEnvironment_GroupDefinition $groupDef |
|
68 | - * the group that we belong to |
|
69 | - * @param string $hostId |
|
70 | - * the alias for this host |
|
71 | - * @return object |
|
72 | - * a host definition to populate |
|
73 | - */ |
|
74 | - public function newHostDefinition(TestEnvironment_GroupDefinition $groupDef, $hostId); |
|
64 | + /** |
|
65 | + * create an empty host definition for this kind of host |
|
66 | + * |
|
67 | + * @param TestEnvironment_GroupDefinition $groupDef |
|
68 | + * the group that we belong to |
|
69 | + * @param string $hostId |
|
70 | + * the alias for this host |
|
71 | + * @return object |
|
72 | + * a host definition to populate |
|
73 | + */ |
|
74 | + public function newHostDefinition(TestEnvironment_GroupDefinition $groupDef, $hostId); |
|
75 | 75 | } |
76 | 76 | \ No newline at end of file |
@@ -59,13 +59,13 @@ |
||
59 | 59 | |
60 | 60 | interface HostAdapterValidator |
61 | 61 | { |
62 | - /** |
|
63 | - * check to make sure that a host adapter plugin is compatible with |
|
64 | - * the group adapter |
|
65 | - * |
|
66 | - * @param HostAdapter $hostAdapter |
|
67 | - * the adapter to validate |
|
68 | - * @return void |
|
69 | - */ |
|
70 | - public function validate(HostAdapter $hostAdapter); |
|
62 | + /** |
|
63 | + * check to make sure that a host adapter plugin is compatible with |
|
64 | + * the group adapter |
|
65 | + * |
|
66 | + * @param HostAdapter $hostAdapter |
|
67 | + * the adapter to validate |
|
68 | + * @return void |
|
69 | + */ |
|
70 | + public function validate(HostAdapter $hostAdapter); |
|
71 | 71 | } |
72 | 72 | \ No newline at end of file |
@@ -60,11 +60,11 @@ |
||
60 | 60 | interface OsAdapter |
61 | 61 | { |
62 | 62 | |
63 | - // ================================================================== |
|
64 | - // |
|
65 | - // Temporary features which will be removed in SP2.4 go here |
|
66 | - // |
|
67 | - // ------------------------------------------------------------------ |
|
63 | + // ================================================================== |
|
64 | + // |
|
65 | + // Temporary features which will be removed in SP2.4 go here |
|
66 | + // |
|
67 | + // ------------------------------------------------------------------ |
|
68 | 68 | |
69 | 69 | /** |
70 | 70 | * what is our operating system name? |
@@ -59,12 +59,12 @@ |
||
59 | 59 | |
60 | 60 | interface OsAdapterValidator |
61 | 61 | { |
62 | - /** |
|
63 | - * validate an operating system adapter |
|
64 | - * |
|
65 | - * @param OsAdapter $osAdapter |
|
66 | - * the adapter to validate |
|
67 | - * @return void |
|
68 | - */ |
|
69 | - public function validate(OsAdapter $osAdapter); |
|
62 | + /** |
|
63 | + * validate an operating system adapter |
|
64 | + * |
|
65 | + * @param OsAdapter $osAdapter |
|
66 | + * the adapter to validate |
|
67 | + * @return void |
|
68 | + */ |
|
69 | + public function validate(OsAdapter $osAdapter); |
|
70 | 70 | } |
71 | 71 | \ No newline at end of file |
@@ -60,9 +60,9 @@ |
||
60 | 60 | */ |
61 | 61 | class Vagrant_E4xx_NoVagrantFile extends Vagrant_E4xx_Exception |
62 | 62 | { |
63 | - public function __construct($candidates) |
|
64 | - { |
|
65 | - $msg = "Cannot find your Vagrantfile. Expected to find it in one of these folders: " . implode(", ", $candidates); |
|
66 | - parent::__construct(400, $msg, $msg); |
|
67 | - } |
|
63 | + public function __construct($candidates) |
|
64 | + { |
|
65 | + $msg = "Cannot find your Vagrantfile. Expected to find it in one of these folders: " . implode(", ", $candidates); |
|
66 | + parent::__construct(400, $msg, $msg); |
|
67 | + } |
|
68 | 68 | } |
69 | 69 | \ No newline at end of file |
@@ -59,48 +59,48 @@ discard block |
||
59 | 59 | |
60 | 60 | class Vagrant_GroupAdapter implements GroupAdapter |
61 | 61 | { |
62 | - public function __construct() |
|
63 | - { |
|
64 | - $this->determineBaseFolder(); |
|
65 | - } |
|
62 | + public function __construct() |
|
63 | + { |
|
64 | + $this->determineBaseFolder(); |
|
65 | + } |
|
66 | 66 | |
67 | - // ================================================================== |
|
68 | - // |
|
69 | - // Base folder support goes here |
|
70 | - // |
|
71 | - // ------------------------------------------------------------------ |
|
67 | + // ================================================================== |
|
68 | + // |
|
69 | + // Base folder support goes here |
|
70 | + // |
|
71 | + // ------------------------------------------------------------------ |
|
72 | 72 | |
73 | - protected $baseFolder; |
|
73 | + protected $baseFolder; |
|
74 | 74 | |
75 | - /** |
|
76 | - * automagically work out where our test environment's files and |
|
77 | - * such like are |
|
78 | - * |
|
79 | - * @return void |
|
80 | - */ |
|
81 | - protected function determineBaseFolder() |
|
82 | - { |
|
83 | - // where should we be looking? |
|
84 | - // |
|
85 | - // first match wins! |
|
86 | - $candidates = [ |
|
87 | - dirname(debug_backtrace()[1]['file']), |
|
88 | - getcwd() |
|
89 | - ]; |
|
75 | + /** |
|
76 | + * automagically work out where our test environment's files and |
|
77 | + * such like are |
|
78 | + * |
|
79 | + * @return void |
|
80 | + */ |
|
81 | + protected function determineBaseFolder() |
|
82 | + { |
|
83 | + // where should we be looking? |
|
84 | + // |
|
85 | + // first match wins! |
|
86 | + $candidates = [ |
|
87 | + dirname(debug_backtrace()[1]['file']), |
|
88 | + getcwd() |
|
89 | + ]; |
|
90 | 90 | |
91 | - foreach ($candidates as $folder) { |
|
92 | - if (file_exists($folder . '/Vagrantfile')) { |
|
93 | - $this->baseFolder = str_replace(getcwd(), '.', $folder); |
|
91 | + foreach ($candidates as $folder) { |
|
92 | + if (file_exists($folder . '/Vagrantfile')) { |
|
93 | + $this->baseFolder = str_replace(getcwd(), '.', $folder); |
|
94 | 94 | |
95 | - // all done |
|
96 | - return; |
|
97 | - } |
|
98 | - } |
|
95 | + // all done |
|
96 | + return; |
|
97 | + } |
|
98 | + } |
|
99 | 99 | |
100 | - // if we get here, then we do not know where the Vagrantfile |
|
101 | - // is, and it is time to bail |
|
102 | - throw new Vagrant_E4xx_NoVagrantFile($candidates); |
|
103 | - } |
|
100 | + // if we get here, then we do not know where the Vagrantfile |
|
101 | + // is, and it is time to bail |
|
102 | + throw new Vagrant_E4xx_NoVagrantFile($candidates); |
|
103 | + } |
|
104 | 104 | |
105 | 105 | /** |
106 | 106 | * which folder should SPv2 be in when interacting with this group |
@@ -110,33 +110,33 @@ discard block |
||
110 | 110 | */ |
111 | 111 | public function getBaseFolder() |
112 | 112 | { |
113 | - return $this->baseFolder; |
|
113 | + return $this->baseFolder; |
|
114 | 114 | } |
115 | 115 | |
116 | - // ================================================================== |
|
117 | - // |
|
118 | - // Host support goes here |
|
119 | - // |
|
120 | - // ------------------------------------------------------------------ |
|
116 | + // ================================================================== |
|
117 | + // |
|
118 | + // Host support goes here |
|
119 | + // |
|
120 | + // ------------------------------------------------------------------ |
|
121 | 121 | |
122 | - /** |
|
123 | - * how do we validate any host adapters used by hosts in this group? |
|
124 | - * |
|
125 | - * @return HostAdapterValidator |
|
126 | - */ |
|
127 | - public function getHostAdapterValidator() |
|
128 | - { |
|
129 | - return new Vagrant_HostAdapterValidator($this); |
|
130 | - } |
|
122 | + /** |
|
123 | + * how do we validate any host adapters used by hosts in this group? |
|
124 | + * |
|
125 | + * @return HostAdapterValidator |
|
126 | + */ |
|
127 | + public function getHostAdapterValidator() |
|
128 | + { |
|
129 | + return new Vagrant_HostAdapterValidator($this); |
|
130 | + } |
|
131 | 131 | |
132 | - // ================================================================== |
|
133 | - // |
|
134 | - // Stuff to support SPv2.0-style internals goes here |
|
135 | - // |
|
136 | - // Everything below here is technical debt, and the plan is to |
|
137 | - // gradually phase it all out over several SPv2 releases |
|
138 | - // |
|
139 | - // ------------------------------------------------------------------ |
|
132 | + // ================================================================== |
|
133 | + // |
|
134 | + // Stuff to support SPv2.0-style internals goes here |
|
135 | + // |
|
136 | + // Everything below here is technical debt, and the plan is to |
|
137 | + // gradually phase it all out over several SPv2 releases |
|
138 | + // |
|
139 | + // ------------------------------------------------------------------ |
|
140 | 140 | |
141 | 141 | /** |
142 | 142 | * what type of group are we? |
@@ -146,8 +146,8 @@ discard block |
||
146 | 146 | * |
147 | 147 | * @return string |
148 | 148 | */ |
149 | - public function getType() |
|
150 | - { |
|
151 | - return "LocalVagrantVms"; |
|
152 | - } |
|
149 | + public function getType() |
|
150 | + { |
|
151 | + return "LocalVagrantVms"; |
|
152 | + } |
|
153 | 153 | } |
154 | 154 | \ No newline at end of file |
@@ -59,20 +59,20 @@ |
||
59 | 59 | |
60 | 60 | class Vagrant_HostAdapterValidator implements HostAdapterValidator |
61 | 61 | { |
62 | - /** |
|
63 | - * check to make sure that a host adapter plugin is compatible with |
|
64 | - * the group adapter |
|
65 | - * |
|
66 | - * @param HostAdapter $hostAdapter |
|
67 | - * the adapter to validate |
|
68 | - * @return boolean |
|
69 | - */ |
|
70 | - public function validate(HostAdapter $hostAdapter) |
|
71 | - { |
|
72 | - if (!$hostAdapter instanceof Vagrant_HostAdapter) { |
|
73 | - return false; |
|
74 | - } |
|
62 | + /** |
|
63 | + * check to make sure that a host adapter plugin is compatible with |
|
64 | + * the group adapter |
|
65 | + * |
|
66 | + * @param HostAdapter $hostAdapter |
|
67 | + * the adapter to validate |
|
68 | + * @return boolean |
|
69 | + */ |
|
70 | + public function validate(HostAdapter $hostAdapter) |
|
71 | + { |
|
72 | + if (!$hostAdapter instanceof Vagrant_HostAdapter) { |
|
73 | + return false; |
|
74 | + } |
|
75 | 75 | |
76 | - return true; |
|
77 | - } |
|
76 | + return true; |
|
77 | + } |
|
78 | 78 | } |
79 | 79 | \ No newline at end of file |
@@ -9,14 +9,14 @@ |
||
9 | 9 | |
10 | 10 | $group1 = $testEnv->newGroup('vagrant', new Vagrant_GroupAdapter); |
11 | 11 | $group1->newHost('default', new Vagrant_VirtualboxHostAdapter) |
12 | - ->setOperatingSystem(new Ubuntu_1404_HostAdapter) |
|
13 | - ->setRoles([ |
|
12 | + ->setOperatingSystem(new Ubuntu_1404_HostAdapter) |
|
13 | + ->setRoles([ |
|
14 | 14 | "host_target", |
15 | 15 | "upload_target", |
16 | 16 | "ssl_target", |
17 | 17 | "zmq_target", |
18 | 18 | ]) |
19 | - ->setStorySettings((object)[ |
|
19 | + ->setStorySettings((object)[ |
|
20 | 20 | "host" => (object)[ |
21 | 21 | "expected" => "successfully retrieved this storySetting :)", |
22 | 22 | ], |