Behat tests: input multi-line to textarea

Re: Behat tests: input multi-line to textarea

by Itamar Tzadok -
Number of replies: 0

Yes, the __toString is really just a magic method and a simple casting should work just as well. In your example it could be something like: (string) $value. String concatenation also works. Have you considered something like the following?

    public function i_set_the_field_to($name, PyStringNode $content) {
        return array(new Given('I set the field "'. $name. '" to "'. $content. '"'));
    }

smile