public function FeedsJSONPathParserTestCase::postAndCheck in Feeds JSONPath Parser 7
Submit a form and confirm the expected fields are present.
1 call to FeedsJSONPathParserTestCase::postAndCheck()
- FeedsJSONPathParserTestCase::test in tests/
feeds_jsonpath_parser.test - Run tests.
File
- tests/
feeds_jsonpath_parser.test, line 136 - Tests for FeedsJSONPathParser.inc.
Class
- FeedsJSONPathParserTestCase
- Test single feeds.
Code
public function postAndCheck($url, $edit, $button, $saved_text) {
// Request the page and confirm it loads correctly.
$this
->drupalGet($url);
$this
->assertResponse(200);
// Submit data to the form.
$this
->drupalPost(NULL, $edit, $button);
// Confirm the expected string was found on the form.
$this
->assertText($saved_text);
// Reload the form.
$this
->drupalGet($url);
// Confirm each of the fields is present on the form and has the expected
// values.
foreach ($edit as $key => $value) {
$this
->assertFieldByName($key, $value);
}
}