當前位置: 首頁>>代碼示例>>PHP>>正文


PHP NodeElement::getValue方法代碼示例

本文整理匯總了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();
 }
開發者ID:BR0kEN-,項目名稱:TqExtension,代碼行數:20,代碼來源:FormValueAssertion.php

示例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;
 }
開發者ID:BR0kEN-,項目名稱:TqExtension,代碼行數:21,代碼來源:DatePicker.php

示例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());
 }
開發者ID:jordi12100,項目名稱:Mink,代碼行數:7,代碼來源:NodeElementTest.php


注:本文中的Behat\Mink\Element\NodeElement::getValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。