Skip to content

Commit df04578

Browse files
authored
Fix tests
1 parent 352d2e1 commit df04578

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

test/CliMenuTest.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,9 @@ public function testAddCustomControlMappingsThrowsExceptionWhenAttemptingToOverw
500500
$menu = new CliMenu('PHP School FTW', []);
501501
$menu->addCustomControlMappings([
502502
'c' => function () {
503-
},
503+
}
504+
]);
505+
$menu->addCustomControlMappings([
504506
'c' => function () {
505507
}
506508
]);
@@ -511,13 +513,7 @@ public function testAddCustomControlMappings() : void
511513
$first = true;
512514
$this->terminal->expects($this->any())
513515
->method('read')
514-
->will(
515-
$this->returnCallback(
516-
function () use (&$first) {
517-
return $first ? 'c' : 'x';
518-
}
519-
)
520-
);
516+
->willReturn('c', 'x');
521517

522518
$style = $this->getStyle($this->terminal);
523519

0 commit comments

Comments
 (0)