Skip to content

Commit

Permalink
chore: prepare for release 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Waldstein committed Sep 3, 2024
1 parent aa13b29 commit 49309e7
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 7 deletions.
6 changes: 4 additions & 2 deletions give-double-the-donation.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
* Plugin Name: Give - Double the Donation
* Plugin URI: https://givewp.com/addons/give-double-the-donation/
* Description: Easily integrate with the Double the Donation employer matching platform.
* Version: 2.0.0
* Version: 2.0.1
* Author: GiveWP
* Requires at least: 6.3
* Requires PHP: 7.2
* Author URI: https://givewp.com/
* Text Domain: give-double-the-donation
* Domain Path: /languages
Expand All @@ -23,7 +25,7 @@
define( 'GIVE_DTD_NAME', 'Give - Double the Donation Integration' );

// Versions
define( 'GIVE_DTD_VERSION', '2.0.0' );
define( 'GIVE_DTD_VERSION', '2.0.1' );
define( 'GIVE_DTD_MIN_GIVE_VERSION', '3.8.0' );

// Add-on paths
Expand Down
7 changes: 5 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Contributors: givewp, dlocc, webdevmattcrom, jason_the_adams
Donate link: https://givewp.com/
Tags: givewp, double the donation, employer matching, company matching donation, employer matching donations
Requires at least: 6.3
Tested up to: 6.5
Tested up to: 6.6
Requires PHP: 7.2
Stable tag: 2.0.0
Stable tag: 2.0.1
Requires Give: 3.8.0
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -70,6 +70,9 @@ Your company will get an email and you will as well with next steps to follow. I

== Changelog ==

= 2.0.1: September 4th, 2024 =
* Fix: Added the “Select a different company” text back to the company selector, which appears when a company has already been selected.

= 2.0.0: April 16th, 2024 =
* New: Added compatibility with the GiveWP visual form builder

Expand Down
48 changes: 45 additions & 3 deletions tests/Unit/TestGiveDoubleTheDonation.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ class TestGiveDoubleTheDonation extends TestCase
*/
public function testReadMeVersionMatchesPluginVersion(): void
{
$readme = file_get_contents( trailingslashit(GIVE_DTD_DIR) . 'readme.txt' );
preg_match('/Stable tag:(.*)/i', $readme, $stableTag);
$readme = get_file_data(
trailingslashit(GIVE_DTD_DIR) . "readme.txt",
[
"Version" => "Stable tag"
]
);

$this->assertEquals( GIVE_DTD_VERSION, trim($stableTag[1]));
$plugin = get_plugin_data(GIVE_DTD_FILE);

$this->assertEquals(GIVE_DTD_VERSION, $readme['Version']);
$this->assertEquals(GIVE_DTD_VERSION, $plugin['Version']);
$this->assertEquals($readme['Version'], $plugin['Version']);
}

/**
Expand All @@ -36,4 +44,38 @@ public function testIsCompatibleWithGiveWP(): void
{
$this->assertTrue(Environment::giveMinRequiredVersionCheck());
}

/**
* @since 2.0.0
*/
public function testReadMeRequiresPHPVersionMatchesPluginVersion(): void
{
$readme = get_file_data(
trailingslashit(GIVE_DTD_DIR) . "readme.txt",
[
"RequiresPHP" => "Requires PHP"
]
);

$plugin = get_plugin_data(GIVE_DTD_FILE);

$this->assertEquals($plugin['RequiresPHP'], $readme['RequiresPHP']);
}

/**
* @since 2.0.0
*/
public function testReadMeRequiresWPVersionMatchesPluginHeaderVersion(): void
{
$readme = get_file_data(
trailingslashit(GIVE_DTD_DIR) . "readme.txt",
[
"RequiresWP" => "Requires at least"
]
);

$plugin = get_plugin_data(GIVE_DTD_FILE);

$this->assertEquals($plugin['RequiresWP'], $readme['RequiresWP']);
}
}

0 comments on commit 49309e7

Please sign in to comment.