Skip to content

Commit

Permalink
Use Yoast/PHPUnit-Polyfills.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Mar 21, 2023
1 parent dc50445 commit f100606
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@

# WordPress
/wordpress/

# PHPUnit
/.phpunit.result.cache
4 changes: 2 additions & 2 deletions tests/src/CurrenciesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Pronamic\WordPress\Money;

use WP_Locale;
use WP_UnitTestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;

/**
* Currencies Test
Expand All @@ -20,7 +20,7 @@
* @version 1.2.2
* @since 1.0.0
*/
class CurrenciesTest extends WP_UnitTestCase {
class CurrenciesTest extends TestCase {
/**
* Test unknwon currency.
*/
Expand Down
4 changes: 2 additions & 2 deletions tests/src/CurrencyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Pronamic\WordPress\Money;

use WP_Locale;
use WP_UnitTestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;

/**
* Currency Test
Expand All @@ -20,7 +20,7 @@
* @version 1.2.2
* @since 1.0.0
*/
class CurrencyTest extends WP_UnitTestCase {
class CurrencyTest extends TestCase {
/**
* Test Euro.
*/
Expand Down
8 changes: 4 additions & 4 deletions tests/src/MoneyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Pronamic\WordPress\Money;

use WP_Locale;
use WP_UnitTestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;

/**
* Money
Expand All @@ -20,12 +20,12 @@
* @version 1.2.2
* @since 1.0.0
*/
class MoneyTest extends WP_UnitTestCase {
class MoneyTest extends TestCase {
/**
* Setup.
*/
public function setUp() {
parent::setUp();
public function set_up() {
parent::set_up();

if ( version_compare( PHP_VERSION, '5.4', '<' ) ) {
add_filter( 'number_format_i18n', [ $this, 'maybe_fix_multibyte_number_format' ], 10, 3 );
Expand Down
8 changes: 4 additions & 4 deletions tests/src/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace Pronamic\WordPress\Money;

use WP_UnitTestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;

/**
* Parser
Expand All @@ -19,7 +19,7 @@
* @version 1.2.5
* @since 1.1.0
*/
class ParserTest extends WP_UnitTestCase {
class ParserTest extends TestCase {
/**
* Parser.
*
Expand All @@ -30,8 +30,8 @@ class ParserTest extends WP_UnitTestCase {
/**
* Setup.
*/
public function setUp() {
parent::setUp();
public function set_up() {
parent::set_up();

$this->parser = new Parser();
}
Expand Down
4 changes: 2 additions & 2 deletions tests/src/TaxedMoneyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
namespace Pronamic\WordPress\Money;

use WP_Locale;
use WP_UnitTestCase;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;

/**
* Taxed Money Test
Expand All @@ -20,7 +20,7 @@
* @version 1.2.2
* @since 1.0.0
*/
class TaxedMoneyTest extends WP_UnitTestCase {
class TaxedMoneyTest extends TestCase {
/**
* Test taxed money.
*/
Expand Down

0 comments on commit f100606

Please sign in to comment.