File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
tests/Unit/Console/Commands/SelfHost Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1212use Illuminate \Support \Facades \Http ;
1313use PHPUnit \Framework \Attributes \CoversClass ;
1414use PHPUnit \Framework \Attributes \UsesClass ;
15- use Tests \TestCase ;
15+ use Tests \TestCaseWithDatabase ;
1616
1717#[CoversClass(SelfHostTelemetryCommand::class)]
1818#[CoversClass(ApiService::class)]
1919#[UsesClass(SelfHostTelemetryCommand::class)]
20- class SelfHostTelemetryCommandTest extends TestCase
20+ class SelfHostTelemetryCommandTest extends TestCaseWithDatabase
2121{
2222 public function test_telemetry_sends_data_to_telemetry_endpoint_of_solidtime_cloud (): void
2323 {
@@ -30,9 +30,12 @@ public function test_telemetry_sends_data_to_telemetry_endpoint_of_solidtime_clo
3030 $ exitCode = $ this ->withoutMockingConsoleOutput ()->artisan ('self-host:telemetry ' );
3131
3232 // Assert
33- $ this ->assertSame (Command::SUCCESS , $ exitCode );
3433 $ output = Artisan::output ();
3534 $ this ->assertSame ('' , $ output );
35+ if ($ exitCode !== Command::SUCCESS ) {
36+ dump ($ output );
37+ }
38+ $ this ->assertSame (Command::SUCCESS , $ exitCode );
3639 }
3740
3841 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