yiisoft / yii2

Yii 2: The Fast, Secure and Professional PHP Framework
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
14.24k stars 6.9k forks source link

Add regex property to one of required option. #20212

Closed alxlnk closed 4 months ago

alxlnk commented 4 months ago

20211

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 64.98%. Comparing base (76150c5) to head (32688de). Report is 2 commits behind head on master.

Files Patch % Lines
framework/widgets/MaskedInput.php 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #20212 +/- ## ========================================= Coverage 64.98% 64.98% - Complexity 11390 11391 +1 ========================================= Files 430 430 Lines 36919 36919 ========================================= Hits 23993 23993 Misses 12926 12926 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

samdark commented 4 months ago

Would you please add a line for changelog and a test?

terabytesoftw commented 4 months ago

You could try the exception and the message, by using regex on the widget without the option alias, and wait.

$this->expectException('yii\base\InvalidConfigException');
$this->expectExceptionMessage('$this message exception')
mtangoo commented 4 months ago

@alxlnk thanks for your time and efforts