8000 ChoiceFormField of type "select" could be "disabled" by bouland · Pull Request #17542 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

ChoiceFormField of type "select" could be "disabled" #17542

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

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add testSelectIsDisabled
Check if field attribute disabled is working
  • Loading branch information
bouland committed Jan 26, 2016
commit 653ecb2dfef5128cb277df9994d04bbbf9ec47d4
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ public function testSelectWithEmptyBooleanAttribute()
$this->assertEquals('bar', $field->getValue());
}

public function testSelectIsDisabled()
{
$node = $this->createSelectNode(array('foo' => false, 'bar' => true), array('disabled' => 'disabled'));
$field = new ChoiceFormField($node);

$this->assertTrue($field->isDisabled(), '->isDisabled() returns true for selects with a disabled attribute');
}

public function testMultipleSelects()
{
$node = $this->createSelectNode(array('foo' => false, 'bar' => false), array('multiple' => 'multiple'));
Expand Down
0