Skip to content

Commit

Permalink
kill mutants
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Nov 20, 2023
1 parent 2cdc339 commit 436891f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Output/Checklist.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private function getLastItem(): mixed {
return end($this->items);
}

public function updateProgressBar(mixed $updateMessage): void {
public function updateProgressBar(string $updateMessage): void {
$item = $this->getLastItem();
if (!$item) {
return;
Expand Down
7 changes: 6 additions & 1 deletion tests/phpunit/src/Commands/ChecklistTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function testSpinner(): void {
$checklist->addItem('Testing!');

// Make the spinner spin with some output.
$outputCallback = static function (mixed $type, mixed $buffer) use ($checklist): void {
$outputCallback = static function (string $type, string $buffer) use ($checklist): void {
$checklist->updateProgressBar($buffer);
};
$this->localMachineHelper->execute(['echo', 'hello world'], $outputCallback, NULL, FALSE);
Expand All @@ -39,6 +39,11 @@ public function testSpinner(): void {
/** @var \Symfony\Component\Console\Helper\ProgressBar $progressBar */
$progressBar = $items[0]['spinner']->getProgressBar();
$this->assertEquals('Testing!', $progressBar->getMessage());
$this->assertEquals('<info>✔</info>', $progressBar->getBarCharacter());
$this->assertEquals('⢸', $progressBar->getProgressCharacter());
$this->assertEquals('', $progressBar->getEmptyBarCharacter());
$this->assertEquals(1, $progressBar->getBarWidth());
$this->assertEquals('', $progressBar->getMessage('detail'));

putenv('PHPUNIT_RUNNING');
}
Expand Down

0 comments on commit 436891f

Please sign in to comment.