Skip to content

Commit

Permalink
Fix for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
korridor committed Dec 2, 2024
1 parent c994260 commit 89e3597
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Illuminate\Http\Client\ConnectionException;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use Tests\TestCase;
Expand All @@ -30,9 +31,13 @@ public function test_telemetry_sends_data_to_telemetry_endpoint_of_solidtime_clo
$exitCode = $this->withoutMockingConsoleOutput()->artisan('self-host:telemetry');

// Assert
$this->assertSame(Command::SUCCESS, $exitCode);
$output = Artisan::output();
$this->fail(print_r(Log::allLogs()->toArray(), true));
$this->assertSame('', $output);
if ($exitCode !== Command::SUCCESS) {
dump($output);
}
$this->assertSame(Command::SUCCESS, $exitCode);
}

public function test_telemetry_sends_fails_gracefully_if_response_has_error_status_code(): void
Expand Down

0 comments on commit 89e3597

Please sign in to comment.