本文整理匯總了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());
}