refactor: ChangeLog::recordPartial and column-size truncation
recordPartial() replaces the partial-log FollowUp blocks in content-create, content-update and post-replace-with-copy; record() truncates ability, object_type and object_id to their column sizes. 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:
@@ -134,8 +134,8 @@ final class ContentCreateAbilityTest extends TestCase
|
||||
Functions\when('wp_insert_post')->justReturn(42);
|
||||
Functions\when('wp_delete_post')->justReturn(false);
|
||||
$log = Mockery::mock(ChangeLog::class);
|
||||
$log->expects('record')
|
||||
->with('lit/content-create', 'lit_person', '42', Mockery::type('string'), null, null, 'partial')
|
||||
$log->expects('recordPartial')
|
||||
->with('lit/content-create', 'lit_person', '42', Mockery::type('string'))
|
||||
->andReturn(9);
|
||||
|
||||
$failure = $this->execute($writer, $log);
|
||||
@@ -153,7 +153,7 @@ final class ContentCreateAbilityTest extends TestCase
|
||||
Functions\when('wp_insert_post')->justReturn(42);
|
||||
Functions\when('wp_delete_post')->justReturn(new WP_Post(['ID' => 42]));
|
||||
$log = Mockery::mock(ChangeLog::class);
|
||||
$log->expects('record')->andReturn(9);
|
||||
$log->expects('recordPartial');
|
||||
|
||||
$failure = $this->execute($writer, $log);
|
||||
|
||||
@@ -168,8 +168,8 @@ final class ContentCreateAbilityTest extends TestCase
|
||||
throw new RuntimeException('save_post hook kaputt');
|
||||
});
|
||||
$log = Mockery::mock(ChangeLog::class);
|
||||
$log->expects('record')
|
||||
->with('lit/content-create', 'lit_person', '', Mockery::type('string'), null, null, 'partial')
|
||||
$log->expects('recordPartial')
|
||||
->with('lit/content-create', 'lit_person', '', Mockery::type('string'))
|
||||
->andReturn(9);
|
||||
|
||||
$failure = $this->execute($writer, $log);
|
||||
|
||||
Reference in New Issue
Block a user