From dbc2adc8f219d8e666be1285c701c361911ac014 Mon Sep 17 00:00:00 2001 From: ramonjd Date: Mon, 10 Oct 2022 10:51:23 +1100 Subject: [PATCH] Adding tests yo --- phpunit/block-supports/typography-test.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/phpunit/block-supports/typography-test.php b/phpunit/block-supports/typography-test.php index e72d1f431e531..d21619a3a5286 100644 --- a/phpunit/block-supports/typography-test.php +++ b/phpunit/block-supports/typography-test.php @@ -340,6 +340,24 @@ public function data_generate_font_size_preset_fixtures() { 'expected_output' => '28px', ), + 'default_return_value_when_value_is_already_clamped' => array( + 'font_size_preset' => array( + 'size' => 'clamp(21px, 1.3125rem + ((1vw - 7.68px) * 2.524), 42px)', + 'fluid' => false, + ), + 'should_use_fluid_typography' => true, + 'expected_output' => 'clamp(21px, 1.3125rem + ((1vw - 7.68px) * 2.524), 42px)', + ), + + 'default_return_value_with_unsupported_unit' => array( + 'font_size_preset' => array( + 'size' => '1000%', + 'fluid' => false, + ), + 'should_use_fluid_typography' => true, + 'expected_output' => '1000%', + ), + 'return_fluid_value' => array( 'font_size_preset' => array( 'size' => '1.75rem',