File tree Expand file tree Collapse file tree
tests/Unit/Console/Commands/SelfHost Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010use Illuminate \Http \Client \ConnectionException ;
1111use Illuminate \Support \Facades \Artisan ;
1212use Illuminate \Support \Facades \Http ;
13+ use Illuminate \Support \Facades \Log ;
1314use PHPUnit \Framework \Attributes \CoversClass ;
1415use PHPUnit \Framework \Attributes \UsesClass ;
1516use Tests \TestCase ;
17+ use Tests \TestCaseWithDatabase ;
1618
1719#[CoversClass(SelfHostTelemetryCommand::class)]
1820#[CoversClass(ApiService::class)]
1921#[UsesClass(SelfHostTelemetryCommand::class)]
20- class SelfHostTelemetryCommandTest extends TestCase
22+ class SelfHostTelemetryCommandTest extends TestCaseWithDatabase
2123{
2224 public function test_telemetry_sends_data_to_telemetry_endpoint_of_solidtime_cloud (): void
2325 {
@@ -30,9 +32,12 @@ public function test_telemetry_sends_data_to_telemetry_endpoint_of_solidtime_clo
3032 $ exitCode = $ this ->withoutMockingConsoleOutput ()->artisan ('self-host:telemetry ' );
3133
3234 // Assert
33- $ this ->assertSame (Command::SUCCESS , $ exitCode );
3435 $ output = Artisan::output ();
3536 $ this ->assertSame ('' , $ output );
37+ if ($ exitCode !== Command::SUCCESS ) {
38+ dump ($ output );
39+ }
40+ $ this ->assertSame (Command::SUCCESS , $ exitCode );
3641 }
3742
3843 public function test_telemetry_sends_fails_gracefully_if_response_has_error_status_code (): void
You can’t perform that action at this time.
0 commit comments