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 12
12
use Illuminate \Support \Facades \Http ;
13
13
use PHPUnit \Framework \Attributes \CoversClass ;
14
14
use PHPUnit \Framework \Attributes \UsesClass ;
15
- use Tests \TestCase ;
15
+ use Tests \TestCaseWithDatabase ;
16
16
17
17
#[CoversClass(SelfHostTelemetryCommand::class)]
18
18
#[CoversClass(ApiService::class)]
19
19
#[UsesClass(SelfHostTelemetryCommand::class)]
20
- class SelfHostTelemetryCommandTest extends TestCase
20
+ class SelfHostTelemetryCommandTest extends TestCaseWithDatabase
21
21
{
22
22
public function test_telemetry_sends_data_to_telemetry_endpoint_of_solidtime_cloud (): void
23
23
{
@@ -30,9 +30,12 @@ public function test_telemetry_sends_data_to_telemetry_endpoint_of_solidtime_clo
30
30
$ exitCode = $ this ->withoutMockingConsoleOutput ()->artisan ('self-host:telemetry ' );
31
31
32
32
// Assert
33
- $ this ->assertSame (Command::SUCCESS , $ exitCode );
34
33
$ output = Artisan::output ();
35
34
$ this ->assertSame ('' , $ output );
35
+ if ($ exitCode !== Command::SUCCESS ) {
36
+ dump ($ output );
37
+ }
38
+ $ this ->assertSame (Command::SUCCESS , $ exitCode );
36
39
}
37
40
38
41
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