Skip to content

Commit

Permalink
Merge pull request #66 from kdambekalns/adjust-to-dom-crawler-update
Browse files Browse the repository at this point in the history
BUGFIX: Adjust test to updated symfony/dom-crawler
  • Loading branch information
kdambekalns authored Jan 20, 2018
2 parents 22e7454 + 7e64929 commit ddaf82e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Tests/Functional/AbstractFunctionalTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@ public function setUp()
protected function gotoNextFormPage(Form $form)
{
$nextButton = $this->browser->getCrawler()->filterXPath('//nav[@class="form-navigation"]/*/*[contains(@class, "next")]/button');
$nextButton->rewind();
/** @var \DOMElement $node */
$node = $nextButton->current();
$node = $nextButton->getNode(0);
$form->set(new InputFormField($node));

return $this->browser->submit($form);
Expand All @@ -73,9 +72,8 @@ protected function gotoNextFormPage(Form $form)
protected function gotoPreviousFormPage(Form $form)
{
$previousButton = $this->browser->getCrawler()->filterXPath('//nav[@class="form-navigation"]/*/*[contains(@class, "previous")]/button');
$previousButton->rewind();
/** @var \DOMElement $node */
$node = $previousButton->current();
$node = $previousButton->getNode(0);
$form->set(new InputFormField($node));

return $this->browser->submit($form);
Expand Down

0 comments on commit ddaf82e

Please sign in to comment.