Skip to content

Commit

Permalink
Clear form display cache for every test
Browse files Browse the repository at this point in the history
  • Loading branch information
doekenorg committed Nov 20, 2024
1 parent 26225f9 commit 290e52f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/unit-tests/GravityView_Edit_Entry_Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,11 @@ private function _reset_context() {
* and second item the render instance, and third item is the reloaded entry.
*/
private function _emulate_render( $form, $view, $entry ) {
// Get clean form every test.
if ( method_exists( GFFormDisplay::class, 'flush_cached_forms' ) ) {
GFFormDisplay::flush_cached_forms();
}

$loader = GravityView_Edit_Entry::getInstance();
$render = $loader->instances['render'];

Expand Down

0 comments on commit 290e52f

Please sign in to comment.