Skip to content
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

[5.2] Fix seeIsSelected for <option> tags without value attribute #14279

Merged
merged 4 commits into from
Jul 12, 2016

Conversation

raphaelsaunier
Copy link
Contributor

This PR adds support for <option> tags without a value="…" attribute to the seeIsSelected testing helper.

c.f. MDN: https://developer.mozilla.org/en/docs/Web/HTML/Element/option

The content of this attribute represents the value to be submitted with the form, should this option be selected. If this attribute is omitted, the value is taken from the text content of the option element.

* @param \DOMElement $option
* @return string
*/
protected function getOptionValue(\DOMElement $option)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please import this.

@@ -74,12 +75,12 @@ protected function getSelectedValueFromSelect(Crawler $select)
/**
* Get the selected value from an option element.
*
* @param \DOMElement $option
* @param DOMElement $option
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please keep the slash here.

@taylorotwell taylorotwell merged commit 9d8b952 into laravel:5.2 Jul 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants