本文整理汇总了PHP中Behat\Mink\Element\NodeElement::getValue方法的典型用法代码示例。如果您正苦于以下问题:PHP NodeElement::getValue方法的具体用法?PHP NodeElement::getValue怎么用?PHP NodeElement::getValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Behat\Mink\Element\NodeElement
的用法示例。
在下文中一共展示了NodeElement::getValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param RawTqContext $context
* Behat context.
* @param string $selector
* Field selector.
* @param bool $not
* Negate the condition.
* @param string $expected
* Expected value.
*/
public function __construct(RawTqContext $context, $selector, $not, $expected = '')
{
$this->not = (bool) $not;
$this->context = $context;
$this->selector = $selector;
$this->expected = $expected;
$this->element = $this->context->element('field', $selector);
$this->value = $this->element->getValue();
$this->tag = $this->element->getTagName();
}
示例2: isDateSelected
/**
* @throws \Exception
*
* @return self
*/
public function isDateSelected()
{
$value = $this->datePicker(['getDate']);
$initial = $this->execute($this->date);
// By some reasons DatePicker could not return a date using "getDate" method
// and we'll try to use it from input value directly. An issue could occur
// after saving the form and/or reloading the page.
if (empty($value)) {
$value = $this->execute(self::jsDate($this->element->getValue()));
}
self::debug(['Comparing "%s" with "%s".'], [$value, $initial]);
if ($value !== $initial) {
throw new \Exception(sprintf('DatePicker contains the "%s" but should "%s".', $value, $initial));
}
return $this;
}
示例3: testGetValue
public function testGetValue()
{
$expected = 'val1';
$node = new NodeElement('input_tag', $this->session);
$this->driver->expects($this->once())->method('getValue')->with('input_tag')->will($this->returnValue($expected));
$this->assertEquals($expected, $node->getValue());
}