/** * @covers charitable_cancel_donation * @depends test_create_donation */ public function test_cancel_donation() { /** * Temporary workaround for issue noted below. * @see https://core.trac.wordpress.org/ticket/37207 */ Charitable_Post_Types::get_instance()->add_endpoints(); $donation_id = $this->create_donation('charitable-pending'); $page = charitable_get_donation_cancel_page_permalink(false, array('donation_id' => $donation_id)); $this->go_to($page); $this->assertTrue(charitable_cancel_donation()); }
/** * @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_donation_cancel_page(false)); }