feat: Fähigkeiten color-write/variable-write; GlobalColorsAdapter und GlobalVariablesAdapter (Manifest, Signatur-Referenzen) und DesignRights::colors()/variables()
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
d73144ab36
commit
9b7c3c1d3b
@@ -9,7 +9,7 @@ use PHPUnit\Framework\TestCase;
|
||||
|
||||
final class DiviFeatureTest extends TestCase
|
||||
{
|
||||
public function testTheElevenFeaturesAndTheirValues(): void
|
||||
public function testTheThirteenFeaturesAndTheirValues(): void
|
||||
{
|
||||
self::assertSame(
|
||||
[
|
||||
@@ -19,6 +19,8 @@ final class DiviFeatureTest extends TestCase
|
||||
'DynamicSources' => 'dynamic-sources',
|
||||
'DesignRead' => 'design-read',
|
||||
'PresetWrite' => 'preset-write',
|
||||
'ColorWrite' => 'color-write',
|
||||
'VariableWrite' => 'variable-write',
|
||||
'LibraryRead' => 'library-read',
|
||||
'LibraryWrite' => 'library-write',
|
||||
'Roles' => 'roles',
|
||||
@@ -32,14 +34,17 @@ final class DiviFeatureTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testOnlyTheFourWriteFeaturesWrite(): void
|
||||
public function testOnlyTheSixWriteFeaturesWrite(): void
|
||||
{
|
||||
$writing = array_values(array_map(
|
||||
static fn (DiviFeature $feature): string => $feature->value,
|
||||
array_filter(DiviFeature::cases(), static fn (DiviFeature $feature): bool => $feature->isWrite())
|
||||
));
|
||||
|
||||
self::assertSame(['page-write', 'preset-write', 'library-write', 'tb-write'], $writing);
|
||||
self::assertSame(
|
||||
['page-write', 'preset-write', 'color-write', 'variable-write', 'library-write', 'tb-write'],
|
||||
$writing
|
||||
);
|
||||
}
|
||||
|
||||
public function testEveryFeatureHasAUniqueGermanLabel(): void
|
||||
@@ -49,6 +54,8 @@ final class DiviFeatureTest extends TestCase
|
||||
self::assertCount(count(DiviFeature::cases()), array_unique($labels));
|
||||
self::assertSame('Seiten schreiben', DiviFeature::PageWrite->label());
|
||||
self::assertSame('Theme Builder lesen', DiviFeature::ThemeBuilderRead->label());
|
||||
self::assertSame('Farben schreiben', DiviFeature::ColorWrite->label());
|
||||
self::assertSame('Variablen schreiben', DiviFeature::VariableWrite->label());
|
||||
foreach ($labels as $label) {
|
||||
self::assertNotSame('', trim($label));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user