Commit d0997112 authored by Dmitry Danilson's avatar Dmitry Danilson
Browse files

Issue #1901370 by jazzitup, salvis, Staratel: Lots of strict warning messages...

Issue #1901370 by jazzitup, salvis, Staratel: Lots of strict warning messages when using PHP 5.4 - 2
parent c92f5ca4
Loading
Loading
Loading
Loading
+15 −15
Original line number Diff line number Diff line
@@ -1118,8 +1118,8 @@ class BotchaHoneypotTestCase extends BotchaUsingJsTestCase {
    return array(FALSE);
  }

  protected function setFormValues($form, $should_pass) {
    $edit = parent::setFormValues($form, $should_pass);
  protected function setFormValues($form, $should_pass, &$parameters = array()) {
    $edit = parent::setFormValues($form, $should_pass, $parameters);
    // Since we can't test javascript (is there a way to do it?) and Simpletest
    // can't evaluate javascript we should do nothing to break the submission.
    return $edit;
@@ -1150,8 +1150,8 @@ class BotchaHoneypot2TestCase extends BotchaUsingJsTestCase {
    return array(FALSE);
  }

  protected function setFormValues($form, $should_pass) {
    $edit = parent::setFormValues($form, $should_pass);
  protected function setFormValues($form, $should_pass, &$parameters = array()) {
    $edit = parent::setFormValues($form, $should_pass, $parameters);
    // Since we can't test javascript (is there a way to do it?) and Simpletest
    // can't evaluate javascript we should do nothing to break the submission.
    return $edit;
@@ -1181,8 +1181,8 @@ class BotchaObscureUrlTestCase extends BotchaUsingJsTestCase {
    return array(FALSE);
  }

  protected function setFormValues($form, $should_pass) {
    $edit = parent::setFormValues($form, $should_pass);
  protected function setFormValues($form, $should_pass, &$parameters = array()) {
    $edit = parent::setFormValues($form, $should_pass, $parameters);
    // Since we can't test javascript (is there a way to do it?) and Simpletest
    // can't evaluate javascript we should do nothing to break the submission.
    return $edit;
@@ -1218,8 +1218,8 @@ class BotchaNoResubmitTestCase extends BotchaTestCase {
    return TRUE;
  }

  protected function setFormValues($form, $should_pass) {
    $edit = parent::setFormValues($form, $should_pass);
  protected function setFormValues($form, $should_pass, &$parameters = array()) {
    $edit = parent::setFormValues($form, $should_pass, $parameters);
    switch ($should_pass) {
      case FALSE:
        // Get form_build_id of the form (to simulate resubmit).
@@ -1230,7 +1230,7 @@ class BotchaNoResubmitTestCase extends BotchaTestCase {
        parent::assertFormSubmission($form, $edit, TRUE);
        // Get new form.
        $this->getForm($form);
        //$edit = parent::setFormValues($form, $should_pass);
        //$edit = parent::setFormValues($form, $should_pass, $parameters);
        // Set form_build_id of the current form to stored value (to simulate resubmit).
        $edit['form_build_id'] = $form_build_id;
        break;
@@ -1242,7 +1242,7 @@ class BotchaNoResubmitTestCase extends BotchaTestCase {
    return $edit;
  }

  public function assertFormSubmission($form, $edit, $should_pass = TRUE, $button = NULL) {
  public function assertFormSubmission($form, $edit, $should_pass = TRUE, $button = NULL, &$parameters = array()) {
    switch ($form) {
      case 'user_login':
      case 'comment':
@@ -1258,7 +1258,7 @@ class BotchaNoResubmitTestCase extends BotchaTestCase {
    }
    // We are placing it to the end since we have a redirection there which
    // makes impossible to assert submission by these conditions.
    parent::assertFormSubmission($form, $edit, $should_pass, $button);
    parent::assertFormSubmission($form, $edit, $should_pass, $button, $parameters);
  }
/* @todo ?Where to place and how to test MultipleBotchaProtectedFormsOnOnePage test case?
  public function testMultipleBotchaProtectedFormsOnOnePage() {
@@ -1310,8 +1310,8 @@ class BotchaTimegateTestCase extends BotchaTestCase {
   * @param type $should_pass
   * @return type
   */
  protected function setFormValues($form, $should_pass) {
    $edit = parent::setFormValues($form, $should_pass);
  protected function setFormValues($form, $should_pass, &$parameters = array()) {
    $edit = parent::setFormValues($form, $should_pass, $parameters);
    switch ($should_pass) {
      case FALSE:
        unset($edit['timegate']);
@@ -1335,7 +1335,7 @@ class BotchaTimegateTestCase extends BotchaTestCase {
    }
  }

  public function assertFormSubmission($form, $edit, $should_pass = TRUE, $button = NULL) {
  public function assertFormSubmission($form, $edit, $should_pass = TRUE, $button = NULL, &$parameters = array()) {
    switch ($form) {
      case 'user_login':
      case 'comment':
@@ -1351,7 +1351,7 @@ class BotchaTimegateTestCase extends BotchaTestCase {
    }
    // We are placing it to the end since we have a redirection there which
    // makes impossible to assert submission by these conditions.
    parent::assertFormSubmission($form, $edit, $should_pass, $button);
    parent::assertFormSubmission($form, $edit, $should_pass, $button, $parameters);
  }
}
// Some tricks to debug: