mirror of
https://github.com/pestphp/pest.git
synced 2026-03-07 08:17:22 +01:00
21 lines
563 B
PHP
21 lines
563 B
PHP
<?php
|
|
|
|
use NunoMaduro\Collision\Adapters\Phpunit\Printer;
|
|
use Pest\Actions\AddsDefaults;
|
|
use PHPUnit\TextUI\DefaultResultPrinter;
|
|
|
|
it('sets defaults', function () {
|
|
$arguments = AddsDefaults::to(['bar' => 'foo']);
|
|
|
|
assertInstanceOf(Printer::class, $arguments['printer']);
|
|
assertEquals($arguments['bar'], 'foo');
|
|
});
|
|
|
|
it('does not override options', function () {
|
|
$defaultResultPrinter = new DefaultResultPrinter();
|
|
|
|
assertEquals(AddsDefaults::to(['printer' => $defaultResultPrinter]), [
|
|
'printer' => $defaultResultPrinter,
|
|
]);
|
|
});
|