Skip to content

Commit

Permalink
Fix lint issues in colors
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Oct 20, 2021
1 parent ca58cca commit f9c4700
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions phpunit/block-supports/colors-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ function test_color_slugs_with_numbers_are_kebab_cased_properly() {
array(
'api_version' => 2,
'attributes' => array(
'textColor' => array(
'textColor' => array(
'type' => 'string',
),
'backgroundColor' => array(
'type' => 'string'
'type' => 'string',
),
'gradient' => array(
'type' => 'string',
),
'gradient' => array(
'type' => 'string'
)
),
'supports' => array(
'color' => array(
Expand All @@ -36,7 +36,11 @@ function test_color_slugs_with_numbers_are_kebab_cased_properly() {
$registry = WP_Block_Type_Registry::get_instance();
$block_type = $registry->get_registered( 'test/test-block' );

$block_atts = array( 'textColor' => 'fg1', 'backgroundColor' => 'bg2', 'gradient' => 'gr3' );
$block_atts = array(
'textColor' => 'fg1',
'backgroundColor' => 'bg2',
'gradient' => 'gr3',
);

$actual = gutenberg_apply_colors_support( $block_type, $block_atts );
$expected = array( 'class' => 'has-text-color has-fg-1-color has-background has-bg-2-background-color has-background has-gr-3-gradient-background' );
Expand Down

0 comments on commit f9c4700

Please sign in to comment.