Skip to content

Instantly share code, notes, and snippets.

@travislopes
Created July 17, 2017 04:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save travislopes/fd243ee24146cc59ac400060026d9399 to your computer and use it in GitHub Desktop.
Save travislopes/fd243ee24146cc59ac400060026d9399 to your computer and use it in GitHub Desktop.
<?php
require_once GFCommon::get_base_path() . '/tests/gravityforms-factory.php';
// Get forms.
$forms = GFAPI::get_forms();
// Loop through forms.
foreach ( $forms as $form ) {
// Initialize factory.
$factory = new GF_UnitTest_Factory();
// Generate entries for form.
$factory->entry->create_many_random( rand( 10, 100 ), $form['id'] );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment