Skip to content

Commit

Permalink
Bump yoast/phpunit-polyfills from 1.0.5 to 2.0.0 (woocommerce#9795)
Browse files Browse the repository at this point in the history
* Bump yoast/phpunit-polyfills from 1.0.5 to 2.0.0

Bumps [yoast/phpunit-polyfills](https://github.com/Yoast/PHPUnit-Polyfills) from 1.0.5 to 2.0.0.
- [Release notes](https://github.com/Yoast/PHPUnit-Polyfills/releases)
- [Changelog](https://github.com/Yoast/PHPUnit-Polyfills/blob/2.x/CHANGELOG.md)
- [Commits](Yoast/PHPUnit-Polyfills@1.0.5...2.0.0)

---
updated-dependencies:
- dependency-name: yoast/phpunit-polyfills
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Remove expect exception usage

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mike Jolley <[email protected]>
  • Loading branch information
dependabot[bot] and mikejolley authored Jul 28, 2023
1 parent 811d6da commit 660a4c5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"require-dev": {
"phpunit/phpunit": "^8",
"woocommerce/woocommerce-sniffs": "0.1.3",
"yoast/phpunit-polyfills": "^1.0",
"yoast/phpunit-polyfills": "^2.0",
"mockery/mockery": "^1",
"wp-hooks/generator": "^0.9.0"
},
Expand Down
16 changes: 8 additions & 8 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions tests/php/Assets/AssetDataRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Automattic\WooCommerce\Blocks\Tests\Assets;

use Yoast\PHPUnitPolyfills\Polyfills\ExpectException;
use Automattic\WooCommerce\Blocks\Assets\Api;
use Automattic\WooCommerce\Blocks\Tests\Mocks\AssetDataRegistryMock;
use Automattic\WooCommerce\Blocks\Package;
Expand All @@ -14,8 +13,6 @@
* @since $VID:$
*/
class AssetDataRegistry extends \WP_UnitTestCase {
use ExpectException;

private $registry;

protected function setUp(): void {
Expand Down
12 changes: 9 additions & 3 deletions tests/php/StoreApi/Utilities/OrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,26 @@
namespace Automattic\WooCommerce\Blocks\Tests\StoreApi\Utilities;

use Automattic\WooCommerce\StoreApi\Exceptions\RouteException;
use Yoast\PHPUnitPolyfills\Polyfills\ExpectException;
use Automattic\WooCommerce\StoreApi\Utilities\OrderController;
use Yoast\PHPUnitPolyfills\TestCases\TestCase;

/**
* OrderControllerTests class.
*/
class OrderControllerTests extends TestCase {
use ExpectException;

/**
* test_validate_selected_shipping_methods_throws
*/
public function test_validate_selected_shipping_methods_throws() {
$class = new OrderController();

$this->expectException( RouteException::class );
$class->validate_selected_shipping_methods( true, array( false ) );
}

/**
* test_validate_selected_shipping_methods.
*/
public function test_validate_selected_shipping_methods() {
$class = new OrderController();

Expand Down

0 comments on commit 660a4c5

Please sign in to comment.