We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cff9ee commit e9a468bCopy full SHA for e9a468b
test/CliMenuTest.php
@@ -508,12 +508,16 @@ public function testAddCustomControlMappingsThrowsExceptionWhenAttemptingToOverw
508
509
public function testAddCustomControlMappings() : void
510
{
511
- $this->terminal->expects($this->at(0))
512
- ->method('read')
513
- ->willReturn('c');
514
- $this->terminal->expects($this->at(1))
+ $first = true;
+ $this->terminal->expects($this->any())
515
->method('read')
516
- ->willReturn('x');
+ ->willReturn(function() use ($first) {
+ if ($first) {
+ $first = false;
517
+ return 'c';
518
+ }
519
+ return 'x';
520
+ });
521
522
$style = $this->getStyle($this->terminal);
523
0 commit comments