-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add MailFieldsTable_sourceMailField #3369
add MailFieldsTable_sourceMailField #3369
Conversation
@ryuring レビューをお願いします。 |
public static function sourceMailFieldDataProvider() | ||
{ | ||
return [ | ||
['radio', ['data' => ['type' => 'radio']], 'radio'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thangnnmd @HungDV2022 195 - 198 については、本当の結果は、true
のはずです。
なぜ assertEquals
がパスするのかわからないですが、テストが良くないです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i sorry @ryuring, there's a bit of confusion.
I didn't check the code again :(
@thangnnmd @HungDV2022 元のコードを見てください。 public function sourceMailField(string $value, array $context)
{
switch($context['data']['type']) {
case 'radio': // ラジオボタン
case 'select': // セレクトボックス
case 'multi_check': // マルチチェックボックス
case 'autozip': // 自動保管郵便番号
return !empty($value);
}
return true;
} return は、 テストの $expected は、'radio' や 'select' になっています。 |
@HungDV2022 check giúp anh nhé, đúng sai cái cơ bản ;( |
@ryuring すみません、修正しましたのでもう一度確認お願いします。 |
ありがとうございます、マージします! |
add MailFieldsTable_sourceMailField