Esempio n. 1
0
 public function setUp()
 {
     parent::setUp();
     add_filter('charitable_auto_login_after_registration', '__return_false');
     /* James Gordon makes a donation and becomes a donor/user in the process. */
     $this->james_gordon = Charitable_User::create_profile(array('user_email' => '*****@*****.**', 'first_name' => 'James', 'last_name' => 'Gordon', 'user_pass' => 'password', 'address' => '22 Batman Avenue', 'address_2' => '', 'city' => 'Gotham', 'state' => 'Gotham State', 'postcode' => '29292', 'country' => 'US'));
     /* Create a campaign wth a donation from James Gordon */
     Charitable_Donation_Helper::create_donation(array('user_id' => $this->james_gordon->ID, 'campaigns' => array(array('campaign_id' => Charitable_Campaign_Helper::create_campaign(), 'amount' => 100)), 'status' => 'charitable-completed', 'gateway' => 'paypal', 'note' => 'This is a note'));
 }