Skip to content

Commit b5a48ef

Browse files
jasonvargaclaude
andcommitted
Add test for cp_thumbnail filter with CP disabled
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 2351c7c commit b5a48ef

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

tests/Console/Commands/AssetsGeneratePresetsTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,19 @@ public function it_only_generates_cp_thumbnail_presets_when_cp_thumbnail_filter_
7272
Bus::assertNotDispatchedSync(GeneratePresetImageManipulation::class, fn ($job) => $job->preset === 'preset_two');
7373
}
7474

75+
#[Test]
76+
public function it_generates_nothing_when_cp_thumbnail_filter_is_used_but_cp_is_disabled()
77+
{
78+
config(['statamic.cp.enabled' => false]);
79+
80+
$this->makeContainer();
81+
$this->putLandscapeImage();
82+
83+
$this->artisan('statamic:assets:generate-presets --preset=cp_thumbnail');
84+
85+
Bus::assertNotDispatchedSync(GeneratePresetImageManipulation::class);
86+
}
87+
7588
#[Test]
7689
public function it_generates_only_the_specified_preset()
7790
{

0 commit comments

Comments
 (0)