Skip to content

Commit ae5a38c

Browse files
committed
test(ConfigCommandTest): add skip for windows_os()
- Added skip for windows_os() in ConfigCommandTest. - Added a RuntimeException exception when no editor is found or specified.
1 parent 3ae8371 commit ae5a38c

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

tests/Feature/ConfigCommandTest.php

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@
121121
$this->artisan(ConfigCommand::class, [
122122
'action' => 'edit',
123123
]);
124-
})->group(__DIR__, __FILE__)->throws(RuntimeException::class, 'No editor found or specified.');
124+
})
125+
->group(__DIR__, __FILE__)
126+
->skip(windows_os())
127+
->throws(RuntimeException::class, 'No editor found or specified.');
125128

126129
it('will throw \SymfonyRuntimeException for edit config', function (): void {
127130
$this->getFunctionMock(class_namespace(Process::class), 'proc_open')
@@ -132,7 +135,10 @@
132135
'action' => 'edit',
133136
'--editor' => 'foo',
134137
]);
135-
})->skip()->group(__DIR__, __FILE__)->throws(SymfonyRuntimeException::class, 'TTY mode requires /dev/tty to be read/writable.');
138+
})
139+
->group(__DIR__, __FILE__)
140+
->skip()
141+
->throws(SymfonyRuntimeException::class, 'TTY mode requires /dev/tty to be read/writable.');
136142

137143
it('will throw SymfonyRuntimeException for edit config', function (): void {
138144
$this->getFunctionMock(class_namespace(ConfigCommand::class), 'exec')
@@ -146,7 +152,10 @@
146152
$this->artisan(ConfigCommand::class, [
147153
'action' => 'edit',
148154
]);
149-
})->group(__DIR__, __FILE__)->throws(SymfonyRuntimeException::class, 'TTY mode requires /dev/tty to be read/writable.');
155+
})
156+
->group(__DIR__, __FILE__)
157+
->skip(windows_os())
158+
->throws(SymfonyRuntimeException::class, 'TTY mode requires /dev/tty to be read/writable.');
150159

151160
it('will throw UnsupportedConfigActionException', function (): void {
152161
$this->artisan(ConfigCommand::class, [

0 commit comments

Comments
 (0)