mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
21 lines
569 B
PHP
21 lines
569 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']);
|
|
|
|
expect($arguments['printer'])->toBeInstanceOf(Printer::class);
|
|
expect($arguments['bar'])->toBe('foo');
|
|
});
|
|
|
|
it('does not override options', function () {
|
|
$defaultResultPrinter = new DefaultResultPrinter();
|
|
|
|
expect(AddsDefaults::to(['printer' => $defaultResultPrinter]))->tobe([
|
|
'printer' => $defaultResultPrinter,
|
|
]);
|
|
});
|