fix: trashed backup before replace, byte-exact meta copy, partial rollback
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01At3V6SjwbMe6eMzVGW3Hs7
This commit is contained in:
@@ -68,6 +68,17 @@ final class PostDuplicateAbilityTest extends TestCase
|
||||
self::assertSame('lit_forbidden', $result->get_error_code());
|
||||
}
|
||||
|
||||
public function testATrashedOriginalIsRefused(): void
|
||||
{
|
||||
$this->original->post_status = 'trash';
|
||||
$cloner = Mockery::mock(PostCloner::class);
|
||||
$cloner->expects('duplicate')->never();
|
||||
|
||||
$result = $this->ability($cloner, Mockery::mock(ChangeLog::class))->execute(['post_id' => 5]);
|
||||
|
||||
self::assertSame('lit_validation_failed', $result->get_error_code());
|
||||
}
|
||||
|
||||
public function testIsIndirectAndNotIdempotent(): void
|
||||
{
|
||||
$ability = $this->ability(Mockery::mock(PostCloner::class), Mockery::mock(ChangeLog::class));
|
||||
|
||||
Reference in New Issue
Block a user