Skip to content

Commit e34511c

Browse files
committed
Fix test php comment
1 parent 86c4b1f commit e34511c

File tree

1 file changed

+6
-24
lines changed

1 file changed

+6
-24
lines changed

tests/unit/Hook/Template/Local/WSLTest.php

+6-24
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class WSLTest extends ShellTest
2121
use ConfigMockery;
2222

2323
/**
24-
* Tests Shell::getCode
24+
* Tests WSL::getCode
2525
*/
2626
public function testTemplate(): void
2727
{
@@ -43,7 +43,7 @@ public function testTemplate(): void
4343
}
4444

4545
/**
46-
* Tests Shell::getCode
46+
* Tests WSL::getCode
4747
*/
4848
public function testTemplateWithDefinedPHP(): void
4949
{
@@ -65,7 +65,7 @@ public function testTemplateWithDefinedPHP(): void
6565
}
6666

6767
/**
68-
* Tests Shell::getCode
68+
* Tests WSL::getCode
6969
*/
7070
public function testTemplateWithDefinedPHPAndRunPath(): void
7171
{
@@ -89,7 +89,7 @@ public function testTemplateWithDefinedPHPAndRunPath(): void
8989
}
9090

9191
/**
92-
* Tests Shell::getCode
92+
* Tests WSL::getCode
9393
*/
9494
public function testTemplateExtExecutable(): void
9595
{
@@ -111,7 +111,7 @@ public function testTemplateExtExecutable(): void
111111
}
112112

113113
/**
114-
* Tests Shell::getCode
114+
* Tests WSL::getCode
115115
*/
116116
public function testTemplateExtExecutableWithDefinedPHP(): void
117117
{
@@ -134,7 +134,7 @@ public function testTemplateExtExecutableWithDefinedPHP(): void
134134
}
135135

136136
/**
137-
* Tests Shell::getCode
137+
* Tests WSL::getCode
138138
*/
139139
public function testTemplateExtExecutableWithUserInput(): void
140140
{
@@ -152,23 +152,5 @@ public function testTemplateExtExecutableWithUserInput(): void
152152
$this->assertStringContainsString('#!/bin/sh', $code);
153153
$this->assertStringContainsString('commit-msg', $code);
154154
$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;
173155
}
174156
}

0 commit comments

Comments
 (0)