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 d644d23 commit b49130bCopy full SHA for b49130b
test/CliMenuTest.php
@@ -511,14 +511,10 @@ public function testAddCustomControlMappings() : void
511
$first = true;
512
$this->terminal->expects($this->any())
513
->method('read')
514
- ->willReturn(
+ ->will(
515
$this->returnCallback(
516
- function() use ($first) {
517
- if ($first) {
518
- $first = false;
519
- return 'c';
520
- }
521
- return 'x';
+ function() use (&$first) {
+ return $first ? 'c' : 'x';
522
}
523
)
524
);
@@ -539,6 +535,7 @@ function() use ($first) {
539
535
$menu->open();
540
536
static::assertStringEqualsFile($this->getTestFile(), $this->output->fetch());
541
537
538
+ $first = false;
542
543
544
0 commit comments