Skip to content

Commit 0d7d6f1

Browse files
simonhampclaude
andcommitted
Mock SatisService in tests to fix CI TypeError
SatisService constructor requires non-nullable string properties from config, which are null in CI. Mock it instead since Satis is not exercised in these tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 95d1452 commit 0d7d6f1

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tests/Feature/Jobs/SyncPluginReleasesTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ public function test_it_updates_latest_version_on_plugin_when_new_releases_are_s
4141
'latest_version' => '0.9.0',
4242
]);
4343

44+
$satisService = $this->mock(SatisService::class);
45+
4446
$job = new SyncPluginReleases($plugin, triggerSatisBuild: false);
45-
$job->handle(app(SatisService::class));
47+
$job->handle($satisService);
4648

4749
$plugin->refresh();
4850

@@ -79,8 +81,10 @@ public function test_it_does_not_update_latest_version_when_no_new_releases(): v
7981
'published_at' => '2026-01-01T00:00:00Z',
8082
]);
8183

84+
$satisService = $this->mock(SatisService::class);
85+
8286
$job = new SyncPluginReleases($plugin, triggerSatisBuild: false);
83-
$job->handle(app(SatisService::class));
87+
$job->handle($satisService);
8488

8589
$plugin->refresh();
8690

0 commit comments

Comments
 (0)