refactor: narrow over-exposed API (L2)
Composer::autoLabel is private (tested through compose()); the DiviComposition getters used only by tests are marked @internal; Limits::snapshotCount is documented as reserved; the ShortformWriter test seam is named $modulesForTests. 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:
@@ -442,9 +442,10 @@ final class ComposerTest extends TestCase
|
||||
public function testAutoLabel(): void
|
||||
{
|
||||
$composer = ComposeFixture::composer();
|
||||
$label = static fn (array $result): mixed => $result['blocks'][0]->attrs()['module']['meta']['adminLabel']['desktop']['value'] ?? null;
|
||||
|
||||
self::assertSame('Hero – Button', $composer->autoLabel('divi/button', 'Hero'));
|
||||
self::assertSame('Button', $composer->autoLabel('divi/button', ''));
|
||||
self::assertSame('Hero – Button', $label($composer->compose([['type' => 'button', 'text' => 'Los']], Block::create('divi/column'), 'n', 'Hero')));
|
||||
self::assertSame('Button', $label($composer->compose([['type' => 'button', 'text' => 'Los']], Block::create('divi/column'), 'n', '')));
|
||||
}
|
||||
|
||||
public function testComposesIntoAnExistingParent(): void
|
||||
|
||||
Reference in New Issue
Block a user