Created
September 14, 2020 17:04
-
-
Save colinodell/e29d3166168b0f04669750c05441c396 to your computer and use it in GitHub Desktop.
Make PHPUnit beep at you any time a test fails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php declare(strict_types=1); | |
namespace Vendor; | |
use PHPUnit\Runner\AfterTestErrorHook; | |
final class BeepExtension implements AfterTestErrorHook | |
{ | |
public function executeAfterTestError(string $test, string $message, float $time): void | |
{ | |
echo "\x07"; // emit BEL | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment