Skip to content
Browse files

Added tests ensuring setValue can be used for select boxes

  • Loading branch information...
1 parent d4cecf5 commit 0911e28a686c7c2288a5e98cb2ef160076b7f836 @stof stof committed May 17, 2014
Showing with 19 additions and 0 deletions.
  1. +19 −0 driver-testsuite/tests/Form/SelectTest.php
View
19 driver-testsuite/tests/Form/SelectTest.php
@@ -85,6 +85,25 @@ public function testElementSelectedStateCheckDataProvider()
);
}
+ public function testSetValueSingleSelect()
+ {
+ $session = $this->getSession();
+ $session->visit($this->pathTo('/multiselect_form.html'));
+ $select = $session->getPage()->findField('select_number');
+
+ $select->setValue('10');
+ $this->assertEquals('10', $select->getValue());
+ }
+
+ public function testSetValueMultiSelect()
+ {
+ $session = $this->getSession();
+ $session->visit($this->pathTo('/multiselect_form.html'));
+ $select = $session->getPage()->findField('select_multiple_values[]');
+
+ $select->setValue(array('1', '2'));
+ $this->assertEquals(array('1', '2'), $select->getValue());
+ }
/**
* @see https://github.com/Behat/Mink/issues/131

0 comments on commit 0911e28

Please sign in to comment.
Something went wrong with that request. Please try again.