Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
php artisan passport:keys

- name: "Run PHPUnit"
run: php artisan test --stop-on-failure --coverage-text --coverage-clover=coverage.xml
run: php artisan test --parallel --stop-on-failure --coverage-text --coverage-clover=coverage.xml

- name: "Upload coverage reports to Codecov"
uses: codecov/[email protected]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
use Illuminate\Support\Facades\Http;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\UsesClass;
use Tests\TestCase;
use Tests\TestCaseWithDatabase;

#[CoversClass(SelfHostTelemetryCommand::class)]
#[CoversClass(ApiService::class)]
#[UsesClass(SelfHostTelemetryCommand::class)]
class SelfHostTelemetryCommandTest extends TestCase
class SelfHostTelemetryCommandTest extends TestCaseWithDatabase
{
public function test_telemetry_sends_data_to_telemetry_endpoint_of_solidtime_cloud(): void
{
Expand All @@ -30,9 +30,12 @@ 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->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
Loading