File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
tests/Unit/Console/Commands/SelfHost Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 10
10
use Illuminate \Http \Client \ConnectionException ;
11
11
use Illuminate \Support \Facades \Artisan ;
12
12
use Illuminate \Support \Facades \Http ;
13
+ use Illuminate \Support \Facades \Log ;
13
14
use PHPUnit \Framework \Attributes \CoversClass ;
14
15
use PHPUnit \Framework \Attributes \UsesClass ;
15
16
use Tests \TestCase ;
17
+ use Tests \TestCaseWithDatabase ;
16
18
17
19
#[CoversClass(SelfHostTelemetryCommand::class)]
18
20
#[CoversClass(ApiService::class)]
19
21
#[UsesClass(SelfHostTelemetryCommand::class)]
20
- class SelfHostTelemetryCommandTest extends TestCase
22
+ class SelfHostTelemetryCommandTest extends TestCaseWithDatabase
21
23
{
22
24
public function test_telemetry_sends_data_to_telemetry_endpoint_of_solidtime_cloud (): void
23
25
{
@@ -30,9 +32,12 @@ public function test_telemetry_sends_data_to_telemetry_endpoint_of_solidtime_clo
30
32
$ exitCode = $ this ->withoutMockingConsoleOutput ()->artisan ('self-host:telemetry ' );
31
33
32
34
// Assert
33
- $ this ->assertSame (Command::SUCCESS , $ exitCode );
34
35
$ output = Artisan::output ();
35
36
$ this ->assertSame ('' , $ output );
37
+ if ($ exitCode !== Command::SUCCESS ) {
38
+ dump ($ output );
39
+ }
40
+ $ this ->assertSame (Command::SUCCESS , $ exitCode );
36
41
}
37
42
38
43
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