fix: gespeichertes false (Divi-Standardschrift) gilt in Theme-Optionen get/update als nicht gesetzt
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
879ca752e7
commit
dab4a9ba2e
@@ -84,6 +84,23 @@ final class DiviThemeOptionsGetAbilityTest extends TestCase
|
||||
self::assertSame('Open Sans', $rows['body_font']['value']);
|
||||
}
|
||||
|
||||
/** Divi stores its default font as false: reported as not set, with the default in effect. */
|
||||
public function testAStoredFalseCountsAsNotSet(): void
|
||||
{
|
||||
$stored = ['heading_font' => false] + ThemeOptionsAreaTest::stored();
|
||||
$writes = [];
|
||||
$ability = new DiviThemeOptionsGetAbility(ThemeOptionsAreaTest::adapter($stored, $writes));
|
||||
|
||||
$result = $ability->execute([]);
|
||||
$row = self::byKey($result)['heading_font'];
|
||||
self::assertSame(ThemeOptionBook::fromDivi($stored)->rev(), $result['design_rev'], 'the rev of the dry run');
|
||||
|
||||
self::assertNull($row['value']);
|
||||
self::assertTrue($row['is_default']);
|
||||
self::assertSame(ThemeOptionSpec::effective('heading_font', []), $row['effective']);
|
||||
self::assertSame($row['effective'], $row['default']);
|
||||
}
|
||||
|
||||
/** Ruling W3: an unset tablet size inherits the desktop size – as effective value and as its default. */
|
||||
public function testUnsetSizesInheritTheLargerSize(): void
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user