Skip to content

Commit

Permalink
Merge 644f657 into 536cb14
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoah committed Feb 16, 2018
2 parents 536cb14 + 644f657 commit 1f63a4a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions gravityforms-multiple-form-instances.php
Expand Up @@ -26,6 +26,7 @@ class Gravity_Forms_Multiple_Form_Instances {
public function __construct() {
// hook the HTML ID string find & replace functionality
add_filter( 'gform_get_form_filter', array( $this, 'gform_get_form_filter' ), 10, 2 );
add_filter( 'gform_confirmation', array( $this, 'gform_get_form_filter' ), 10, 2 );
}

/**
Expand Down
9 changes: 9 additions & 0 deletions tests/unit-tests/GFMFI_ConstructTest.php
Expand Up @@ -19,4 +19,13 @@ public function testHookRegistered() {
$this->assertSame( 10, has_filter( 'gform_get_form_filter', array( $this->gfmfi, 'gform_get_form_filter' ) ) );
}

/**
* @covers Gravity_Forms_Multiple_Form_Instances::__construct
*/
public function testHookGformConfirmationRegistered() {
$this->gfmfi->__construct();

$this->assertSame( 10, has_filter( 'gform_confirmation', array( $this->gfmfi, 'gform_get_form_filter' ) ) );
}

}

0 comments on commit 1f63a4a

Please sign in to comment.