src/Constraints/IsSelected.php
public function getSelectedValue(Crawler $crawler)
    {
        $field = $this->field($crawler);

        return $field->nodeName() == 'select'
            ? $this->getSelectedValueFromSelect($field)
            : [$this->getCheckedValueFromRadioGroup($field)];
    }
public function getSelectedValue(Crawler $crawler)
    {
        $field = $this->field($crawler);

        return $field->nodeName() == 'select'
            ? $this->getSelectedValueFromSelect($field)
            : [$this->getCheckedValueFromRadioGroup($field)];
    }
public function getSelectedValue ( Crawler $ crawler ) { $ field = $ this -> field ( $ crawler ) ; return $ field -> nodeName ( ) == 'select' ? $ this -> getSelectedValueFromSelect ( $ field ) : [ $ this -> getCheckedValueFromRadioGroup ( $ field ) ] ; }
Get the selected value of a select field or radio group.

@param  \Symfony\Component\DomCrawler\Crawler  $crawler
@return array

@throws \PHPUnit\Framework\ExpectationFailedException
Get the selected value of a select field or radio group .