From 85291b462b577e886c841db4ce9ac160fdab4f8f Mon Sep 17 00:00:00 2001 From: Dmitrii Derepko Date: Wed, 29 May 2024 01:48:16 +0300 Subject: [PATCH] Fix test --- src/Inspector/Command/BashCommand.php | 2 +- tests/Unit/Inspector/Command/BashCommandTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Inspector/Command/BashCommand.php b/src/Inspector/Command/BashCommand.php index 597bbcc..9485c99 100644 --- a/src/Inspector/Command/BashCommand.php +++ b/src/Inspector/Command/BashCommand.php @@ -38,7 +38,7 @@ public function run(): CommandResponse ->setTimeout(null) ->run(); - $processOutput = rtrim($process->getOutput(), PHP_EOL); + $processOutput = rtrim($process->getOutput()); if (!$process->getExitCode() > 1) { return new CommandResponse( diff --git a/tests/Unit/Inspector/Command/BashCommandTest.php b/tests/Unit/Inspector/Command/BashCommandTest.php index 1fb8454..5a327f7 100644 --- a/tests/Unit/Inspector/Command/BashCommandTest.php +++ b/tests/Unit/Inspector/Command/BashCommandTest.php @@ -21,7 +21,7 @@ public function testSuccess(): void $response = $command->run(); $this->assertSame(CommandResponse::STATUS_OK, $response->getStatus()); - $this->assertSame('test' . PHP_EOL, $response->getResult()); + $this->assertSame('test', $response->getResult()); $this->assertSame([], $response->getErrors()); }