ci: fixes dd test

This commit is contained in:
nuno maduro
2026-06-11 10:50:24 +01:00
parent 553aac65e6
commit 3aab02d2eb
2 changed files with 0 additions and 41 deletions

View File

@ -120,8 +120,6 @@ final class Expectation
/**
* Dump the expectation value and end the script.
*
* @return never
*/
public function dd(mixed ...$arguments): never
{

View File

@ -1,39 +0,0 @@
<?php
use PHPUnit\Framework\ExpectationFailedException;
it('dd throws ExpectationFailedException with dumped value in parallel mode', function () {
putenv('PARATEST=1');
try {
expect(42)->dd();
} catch (ExpectationFailedException $e) {
expect($e->getMessage())->toContain('42');
} finally {
putenv('PARATEST');
}
});
it('dd throws ExpectationFailedException with all dumped arguments in parallel mode', function () {
putenv('PARATEST=1');
try {
expect('hello')->dd('extra');
} catch (ExpectationFailedException $e) {
expect($e->getMessage())
->toContain('hello')
->toContain('extra');
} finally {
putenv('PARATEST');
}
});
it('dd throws ExpectationFailedException with dumped value when running under pest', function () {
expect($_SERVER['COLLISION_PRINTER'])->toBe('DefaultPrinter');
try {
expect(42)->dd();
} catch (ExpectationFailedException $e) {
expect($e->getMessage())->toContain('42');
}
});