mirror of
https://github.com/pestphp/pest.git
synced 2026-03-09 09:17:23 +01:00
first
This commit is contained in:
20
tests/Unit/Actions/AddsDefaults.php
Normal file
20
tests/Unit/Actions/AddsDefaults.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?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,
|
||||
]);
|
||||
});
|
||||
Reference in New Issue
Block a user