Derived from Peridot Dot Reporter
- PHP 7+
- Terminal that supports emojis - i.e. iTerm2
I recommend installing the reporter to your project via composer:
$ composer require --dev ryanplasma/peridot-emoji-reporter:~1.0
You can register the reporter via your peridot.php file.
<?php
use Evenement\EventEmitterInterface;
use Peridot\Reporter\Emoji\EmojiReporter;
use Peridot\Reporter\Emoji\EmojiReporterPlugin;
use Spatie\Emoji\Emoji;
return function(EventEmitterInterface $emitter) {
(new EmojiReporterPlugin($emitter))->register();
$emitter->on('emoji.start', function (EmojiReporter $reporter) {
// The next 3 lines are optional - use them to change the default emojis
$reporter->setPassEmoji(Emoji::smilingCatFaceWithHeartShapedEyes());
$reporter->setFailEmoji(Emoji::noEntry());
$reporter->setPendingEmoji(Emoji::alienMonster());
});
};
Default Emojis are:
- 🍕 for passing tests
- 💩 for failing tests
- 🙉 for pending tests
See above example for how to customize what emojis are used.
You can run the reporter specs and also preview the reporter in action like so:
$ vendor/bin/peridot specs/ -r emoji