public function fieldValueEquals($field, $value, TraversableElement $container = null)
    {
        $node = $this->fieldExists($field, $container);
        $actual = $node->getValue();
        $regex = '/^'.preg_quote($value, '/').'$/ui';

        $message = sprintf('The field "%s" value is "%s", but "%s" expected.', $field, $actual, $value);

        $this->assert((bool) preg_match($regex, $actual), $message);
    }
public function fieldValueEquals($field, $value, TraversableElement $container = null)
    {
        $node = $this->fieldExists($field, $container);
        $actual = $node->getValue();
        $regex = '/^'.preg_quote($value, '/').'$/ui';

        $message = sprintf('The field "%s" value is "%s", but "%s" expected.', $field, $actual, $value);

        $this->assert((bool) preg_match($regex, $actual), $message);
    }
public function fieldValueEquals ( $ field , $ value , TraversableElement $ container = null ) { $ node = $ this -> fieldExists ( $ field , $ container ) ; $ actual = $ node -> getValue ( ) ; $ regex = '/^' . preg_quote ( $ value , '/' ) . '$/ui' ; $ message = sprintf ( 'The field "%s" value is "%s", but "%s" expected.' , $ field , $ actual , $ value ) ; $ this -> assert ( ( bool ) preg_match ( $ regex , $ actual ) , $ message ) ; }
Checks that specific field have provided value.

@param string             $field     field id|name|label|value
@param string             $value     field value
@param TraversableElement $container document to check against

@throws ExpectationException
Checks that specific field have provided value .