Created
October 15, 2010 00:23
-
-
Save adamdicarlo/627343 to your computer and use it in GitHub Desktop.
Generates a bunch of test data and inserts it into the simple_payment module's payments table.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
require_once './includes/bootstrap.inc'; | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); | |
$payment = array( | |
'gateway' => 'paypal', | |
'uid' => 0, | |
'nid' => 1, | |
'module' => NULL, | |
'currency' => 'USD', | |
); | |
for ($i = 0; $i < 50; $i++) { | |
$payment['timestamp'] = time() - mt_rand(0, 225000); | |
$payment['payer_email'] = user_password() . '@opensourcery.com'; | |
$payment['amount'] = mt_rand(50, 25000); | |
drupal_write_record('simple_payment', $payment); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment