Skip to content

Commit 57731d2

Browse files
committed
Added test coverage for Tugboat.
1 parent 5ef91ae commit 57731d2

File tree

1 file changed

+40
-2
lines changed

1 file changed

+40
-2
lines changed

tests/src/EnvironmentTest.php

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ final class EnvironmentTest extends TestCase
1313

1414
/**
1515
* Test the commandExists() method.
16-
*
17-
* @covers \Davereid\DrupalEnvironment\Environment::commandExists
1816
*/
1917
public function testCommandExists(): void
2018
{
@@ -75,6 +73,7 @@ public function providerEnvironment(): array
7573
'isCircleCi' => false,
7674
'isGitHubWorkflow' => false,
7775
'isGitLabCi' => false,
76+
'isTugboat' => false,
7877
'isPantheon' => false,
7978
'isProduction' => false,
8079
'isStaging' => false,
@@ -98,6 +97,7 @@ public function providerEnvironment(): array
9897
'isCircleCi' => false,
9998
'isGitHubWorkflow' => false,
10099
'isGitLabCi' => false,
100+
'isTugboat' => false,
101101
'isPantheon' => false,
102102
'isProduction' => true,
103103
'isStaging' => false,
@@ -122,6 +122,7 @@ public function providerEnvironment(): array
122122
'isCircleCi' => false,
123123
'isGitHubWorkflow' => false,
124124
'isGitLabCi' => false,
125+
'isTugboat' => false,
125126
'isPantheon' => false,
126127
'isProduction' => false,
127128
'isStaging' => false,
@@ -142,6 +143,7 @@ public function providerEnvironment(): array
142143
'isCircleCi' => false,
143144
'isGitHubWorkflow' => false,
144145
'isGitLabCi' => false,
146+
'isTugboat' => false,
145147
'isPantheon' => true,
146148
'isProduction' => true,
147149
'isStaging' => false,
@@ -167,6 +169,7 @@ public function providerEnvironment(): array
167169
'isCircleCi' => false,
168170
'isGitHubWorkflow' => false,
169171
'isGitLabCi' => false,
172+
'isTugboat' => false,
170173
'isPantheon' => true,
171174
'isProduction' => false,
172175
'isStaging' => true,
@@ -192,6 +195,7 @@ public function providerEnvironment(): array
192195
'isCircleCi' => false,
193196
'isGitHubWorkflow' => false,
194197
'isGitLabCi' => false,
198+
'isTugboat' => false,
195199
'isPantheon' => true,
196200
'isProduction' => false,
197201
'isStaging' => false,
@@ -217,6 +221,7 @@ public function providerEnvironment(): array
217221
'isCircleCi' => false,
218222
'isGitHubWorkflow' => false,
219223
'isGitLabCi' => false,
224+
'isTugboat' => false,
220225
'isPantheon' => true,
221226
'isProduction' => false,
222227
'isStaging' => false,
@@ -242,6 +247,7 @@ public function providerEnvironment(): array
242247
'isCircleCi' => false,
243248
'isGitHubWorkflow' => false,
244249
'isGitLabCi' => false,
250+
'isTugboat' => false,
245251
'isPantheon' => true,
246252
'isProduction' => false,
247253
'isStaging' => false,
@@ -263,6 +269,7 @@ public function providerEnvironment(): array
263269
'isCircleCi' => false,
264270
'isGitHubWorkflow' => false,
265271
'isGitLabCi' => false,
272+
'isTugboat' => false,
266273
'isPantheon' => true,
267274
'isProduction' => false,
268275
'isStaging' => false,
@@ -278,6 +285,32 @@ public function providerEnvironment(): array
278285
],
279286
],
280287
],
288+
'tugboat' => [
289+
[
290+
'TUGBOAT_PREVIEW_NAME' => 'phpunit',
291+
],
292+
[
293+
'getEnvironment' => 'local',
294+
'isAcquia' => false,
295+
'isCircleCi' => false,
296+
'isGitHubWorkflow' => false,
297+
'isGitLabCi' => false,
298+
'isTugboat' => true,
299+
'isPantheon' => true,
300+
'isProduction' => false,
301+
'isStaging' => false,
302+
'isDevelopment' => false,
303+
'isPreview' => true,
304+
'isMultidev' => false,
305+
'isCi' => false,
306+
'isLocal' => true,
307+
'getIndicatorConfig' => [
308+
'name' => 'Preview',
309+
'bg_color' => '#ffffff',
310+
'fg_color' => '#990055',
311+
],
312+
],
313+
],
281314
'circleci' => [
282315
[
283316
'CI' => 'true',
@@ -289,6 +322,7 @@ public function providerEnvironment(): array
289322
'isCircleCi' => true,
290323
'isGitHubWorkflow' => false,
291324
'isGitLabCi' => false,
325+
'isTugboat' => false,
292326
'isPantheon' => false,
293327
'isProduction' => false,
294328
'isStaging' => false,
@@ -310,6 +344,7 @@ public function providerEnvironment(): array
310344
'isCircleCi' => false,
311345
'isGitHubWorkflow' => true,
312346
'isGitLabCi' => false,
347+
'isTugboat' => false,
313348
'isPantheon' => false,
314349
'isProduction' => false,
315350
'isStaging' => false,
@@ -331,6 +366,7 @@ public function providerEnvironment(): array
331366
'isCircleCi' => false,
332367
'isGitHubWorkflow' => false,
333368
'isGitLabCi' => true,
369+
'isTugboat' => false,
334370
'isPantheon' => false,
335371
'isProduction' => false,
336372
'isStaging' => false,
@@ -351,6 +387,7 @@ public function providerEnvironment(): array
351387
'isCircleCi' => false,
352388
'isGitHubWorkflow' => false,
353389
'isGitLabCi' => false,
390+
'isTugboat' => false,
354391
'isPantheon' => false,
355392
'isProduction' => false,
356393
'isStaging' => false,
@@ -375,6 +412,7 @@ public function providerEnvironment(): array
375412
'isCircleCi' => false,
376413
'isGitHubWorkflow' => false,
377414
'isGitLabCi' => false,
415+
'isTugboat' => false,
378416
'isPantheon' => false,
379417
'isProduction' => false,
380418
'isStaging' => false,

0 commit comments

Comments
 (0)