fix: FontInstaller prüft Divis Schriftenliste vor font_add; leere Installation ist ein sauberer Rollback
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
901179de62
commit
2b45f1bdd3
@@ -464,6 +464,24 @@ final class DiviFontsUploadAbilityTest extends TestCase
|
||||
$this->assertTempFilesRemoved();
|
||||
}
|
||||
|
||||
public function testAnInstallThatStoredNothingIsACleanRollback(): void
|
||||
{
|
||||
$installer = self::installer();
|
||||
$installer->allows('install')->andReturn([]);
|
||||
$installer->expects('remove')->never();
|
||||
$log = FakeChangeLog::partialsOnly();
|
||||
|
||||
try {
|
||||
$this->ability($installer, $log)->execute(self::input(['confirm' => true]));
|
||||
self::fail('WriteFailed expected');
|
||||
} catch (WriteFailed $e) {
|
||||
self::assertTrue($e->rolledBack);
|
||||
$error = self::assertToolError($e->toError(), 'write_failed');
|
||||
self::assertStringContainsString('nichts gespeichert', $error['message']);
|
||||
}
|
||||
self::assertSame([], $log->partials);
|
||||
}
|
||||
|
||||
public function testAPartialInstallThatCannotBeRemovedIsAPartialWrite(): void
|
||||
{
|
||||
$installer = self::installer();
|
||||
|
||||
Reference in New Issue
Block a user