Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb79b9cf

Browse files
committed
Refactoring example code for the dialog helper command test
1 parent5ac4466 commitb79b9cf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

‎components/console/helpers/dialoghelper.rst‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,11 @@ from the command line, you need to overwrite the HelperSet used by the command::
114114
// ...
115115
$commandTester = new CommandTester($command);
116116
117-
$dialog =new DialogHelper();
117+
$dialog =$command->getHelper('dialog');
118118
$dialog->setInputStream($this->getInputStream('Test\n'));
119119
// Equals to a user inputing "Test" and hitting ENTER
120120
// If you need to enter a confirmation, "yes\n" will work
121121
122-
$command->setHelperSet(new HelperSet(array($dialog)));
123-
124122
$commandTester->execute(array('command' => $command->getName()));
125123
126124
// $this->assertRegExp('/.../', $commandTester->getDisplay());

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp