@@ -21,7 +21,7 @@ class WSLTest extends ShellTest
21
21
use ConfigMockery;
22
22
23
23
/**
24
- * Tests Shell ::getCode
24
+ * Tests WSL ::getCode
25
25
*/
26
26
public function testTemplate (): void
27
27
{
@@ -43,7 +43,7 @@ public function testTemplate(): void
43
43
}
44
44
45
45
/**
46
- * Tests Shell ::getCode
46
+ * Tests WSL ::getCode
47
47
*/
48
48
public function testTemplateWithDefinedPHP (): void
49
49
{
@@ -65,7 +65,7 @@ public function testTemplateWithDefinedPHP(): void
65
65
}
66
66
67
67
/**
68
- * Tests Shell ::getCode
68
+ * Tests WSL ::getCode
69
69
*/
70
70
public function testTemplateWithDefinedPHPAndRunPath (): void
71
71
{
@@ -89,7 +89,7 @@ public function testTemplateWithDefinedPHPAndRunPath(): void
89
89
}
90
90
91
91
/**
92
- * Tests Shell ::getCode
92
+ * Tests WSL ::getCode
93
93
*/
94
94
public function testTemplateExtExecutable (): void
95
95
{
@@ -111,7 +111,7 @@ public function testTemplateExtExecutable(): void
111
111
}
112
112
113
113
/**
114
- * Tests Shell ::getCode
114
+ * Tests WSL ::getCode
115
115
*/
116
116
public function testTemplateExtExecutableWithDefinedPHP (): void
117
117
{
@@ -134,7 +134,7 @@ public function testTemplateExtExecutableWithDefinedPHP(): void
134
134
}
135
135
136
136
/**
137
- * Tests Shell ::getCode
137
+ * Tests WSL ::getCode
138
138
*/
139
139
public function testTemplateExtExecutableWithUserInput (): void
140
140
{
@@ -152,23 +152,5 @@ public function testTemplateExtExecutableWithUserInput(): void
152
152
$ this ->assertStringContainsString ('#!/bin/sh ' , $ code );
153
153
$ this ->assertStringContainsString ('commit-msg ' , $ code );
154
154
$ this ->assertStringContainsString ('wsl.exe /usr/local/bin/captainhook $INTERACTIVE ' , $ code );
155
- $ this ->assertStringContainsString ($ this ->getTtyRedirectionLines (), $ code );
156
- }
157
-
158
- /**
159
- * Returns the expected TTY redirection lines
160
- *
161
- * @return string
162
- */
163
- private function getTtyRedirectionLines (): string
164
- {
165
- return <<<'EOD'
166
- if [ -t 1 ]; then
167
- # If we're in a terminal, redirect stdout and stderr to /dev/tty and
168
- # read stdin from /dev/tty. Allow interactive mode for CaptainHook.
169
- exec >/dev/tty 2>/dev/tty </dev/tty
170
- INTERACTIVE=""
171
- fi
172
- EOD;
173
155
}
174
156
}
0 commit comments