some URL>', 'some URL', 'some URL', 'JetBrains-JediTerm'],
];
}
diff --git a/Tests/Helper/FormatterHelperTest.php b/Tests/Helper/FormatterHelperTest.php
index 934e11ac1..c9a3c5e00 100644
--- a/Tests/Helper/FormatterHelperTest.php
+++ b/Tests/Helper/FormatterHelperTest.php
@@ -83,9 +83,9 @@ public function testFormatBlockLGEscaping()
$formatter = new FormatterHelper();
$this->assertEquals(
- ' '."\n".
- ' \some info\ '."\n".
- ' ',
+ ' '."\n".
+ ' \some info\ '."\n".
+ ' ',
$formatter->formatBlock('some info', 'error', true),
'::formatBlock() escapes \'<\' chars'
);
diff --git a/Tests/Input/StringInputTest.php b/Tests/Input/StringInputTest.php
index f781b7ccf..2bd40dec9 100644
--- a/Tests/Input/StringInputTest.php
+++ b/Tests/Input/StringInputTest.php
@@ -71,6 +71,7 @@ public function getTokenizeData()
["--long-option='foo bar''another'", ['--long-option=foo baranother'], '->tokenize() parses long options with a value'],
["--long-option='foo bar'\"another\"", ['--long-option=foo baranother'], '->tokenize() parses long options with a value'],
['foo -a -ffoo --long bar', ['foo', '-a', '-ffoo', '--long', 'bar'], '->tokenize() parses when several arguments and options'],
+ ["--arg=\\\"'Jenny'\''s'\\\"", ["--arg=\"Jenny's\""], '->tokenize() parses quoted quotes'],
];
}
diff --git a/Tests/Question/ChoiceQuestionTest.php b/Tests/Question/ChoiceQuestionTest.php
index 8a48cfcf1..8de26419f 100644
--- a/Tests/Question/ChoiceQuestionTest.php
+++ b/Tests/Question/ChoiceQuestionTest.php
@@ -19,14 +19,15 @@ class ChoiceQuestionTest extends TestCase
/**
* @dataProvider selectUseCases
*/
- public function testSelectUseCases($multiSelect, $answers, $expected, $message)
+ public function testSelectUseCases($multiSelect, $answers, $expected, $message, $default = null)
{
$question = new ChoiceQuestion('A question', [
'First response',
'Second response',
'Third response',
'Fourth response',
- ]);
+ null,
+ ], $default);
$question->setMultiselect($multiSelect);
@@ -59,6 +60,19 @@ public function selectUseCases()
['First response', 'Second response'],
'When passed multiple answers on MultiSelect, the defaultValidator must return these answers as an array',
],
+ [
+ false,
+ [null],
+ null,
+ 'When used null as default single answer on singleSelect, the defaultValidator must return this answer as null',
+ ],
+ [
+ false,
+ ['First response'],
+ 'First response',
+ 'When used a string as default single answer on singleSelect, the defaultValidator must return this answer as a string',
+ 'First response',
+ ],
[
false,
[0],
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy