Skip to content

Commit

Permalink
Print type directly
Browse files Browse the repository at this point in the history
  • Loading branch information
tienvx committed Sep 27, 2023
1 parent 9289a44 commit dcdbc21
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/PhpPact/Helper/ProviderProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@ public function __construct(string $publicPath, private int $port = 7202)

public function start(): void
{
$this->process->start(function ($type, $buffer): void {
if (Process::ERR === $type) {
echo 'ERR > '.$buffer;
} else {
echo 'OUT > '.$buffer;
}
$this->process->start(function (string $type, string $buffer): void {
echo "\n$type > $buffer";
});
$this->process->waitUntil(function (): bool {
$fp = @fsockopen('127.0.0.1', $this->port);
Expand Down

0 comments on commit dcdbc21

Please sign in to comment.