Skip to content
Browse files

added get-method for testcase

  • Loading branch information...
1 parent 10f62cc commit 77b249bd82ad140ed251e68f4f7cd6132ff61ab6 @everzet everzet committed
View
14 tests/Behat/Mink/Driver/GeneralDriverTest.php
@@ -387,6 +387,20 @@ public function testBasicForm()
$this->assertEquals('Lastname: Kudryashov', $page->find('css', '#last')->getText());
}
+ public function testBasicGetForm()
+ {
+ $this->getSession()->visit($this->pathTo('/basic_get_form.php'));
+
+ $page = $this->getSession()->getPage();
+ $this->assertEquals('Basic Get Form Page', $page->find('css', 'h1')->getText());
+
+ $search = $page->findField('q');
+ $search->setValue('some#query');
+ $page->pressButton('Find');
+
+ $this->assertEquals('some#query', $page->find('css', '#search')->getText());
+ }
+
public function testMultiselect()
{
$this->getSession()->visit($this->pathTo('/multiselect_form.php'));
View
20 tests/Behat/Mink/Driver/web-fixtures/basic_get_form.php
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">
+<head>
+ <title>Basic Get Form</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
+</head>
+<body>
+ <h1>Basic Get Form Page</h1>
+
+ <div id="serach">
+ <?php echo isset($_GET['q']) && $_GET['q'] ? $_GET['q'] : 'No search query' ?>
+ </div>
+
+ <form>
+ <input name="q" value="" type="text" />
+
+ <input type="submit" value="Find" />
+ </form>
+</body>
+</html>

0 comments on commit 77b249b

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