コード例 #1
0
 /**
  * @covers charitable_is_campaign_donation_page
  * @depends test_is_campaign_donation_page
  */
 public function test_is_not_campaign_donation_page_strict()
 {
     $this->set_charitable_option('donation_form_display', 'same_page');
     $page = charitable_get_campaign_donation_page_permalink(false, array('campaign_id' => self::$campaign_id));
     $this->go_to($page);
     $this->assertFalse(charitable_is_campaign_donation_page(false, array('strict' => true)));
 }
コード例 #2
0
 /**
  * Adds custom body classes when viewing widget or donation form.
  *
  * @param 	array 		$classes
  * @return 	array
  * @access  public
  * @since 	1.0.0
  */
 public function add_donation_page_body_class($classes)
 {
     if (charitable_is_campaign_donation_page()) {
         $classes[] = 'campaign-donation-page';
     }
     return $classes;
 }
コード例 #3
0
 /**
  * @covers charitable_is_donation_cancel_page
  */
 public function test_charitable_is_donation_cancel_page()
 {
     $page = charitable_get_donation_cancel_page_permalink(false, array('donation_id' => self::$donation_id));
     $this->go_to($page);
     $this->assertTrue(charitable_is_campaign_donation_page());
 }