From b00d5c4d58989b96d4a06e64d278c312f551eee6 Mon Sep 17 00:00:00 2001 From: Brady Vercher Date: Wed, 10 Feb 2021 17:18:55 -0800 Subject: [PATCH] Fix the authentication integration tests after a2415c7. --- .../phpunit/Integration/Provider/AuthenticationTest.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/Integration/Provider/AuthenticationTest.php b/tests/phpunit/Integration/Provider/AuthenticationTest.php index 4c935d8..acc81a9 100644 --- a/tests/phpunit/Integration/Provider/AuthenticationTest.php +++ b/tests/phpunit/Integration/Provider/AuthenticationTest.php @@ -10,6 +10,7 @@ use SatisPress\Provider\Authentication; use SatisPress\Test\Integration\TestCase; use WP_Error; +use WPDieException; use function Patchwork\{always, redefine, restore}; use function SatisPress\get_packages_permalink; @@ -79,7 +80,7 @@ public function test_authentication_fails_with_invalid_scheme() { $user = wp_get_current_user(); $this->assertSame( 0, $user->ID ); - $this->expectException( AuthenticationException::class ); + $this->expectException( WPDieException::class ); $this->go_to( get_packages_permalink() ); } @@ -93,7 +94,7 @@ public function test_authentication_fails_with_invalid_realm() { $user = wp_get_current_user(); $this->assertSame( 0, $user->ID ); - $this->expectException( AuthenticationException::class ); + $this->expectException( WPDieException::class ); $this->go_to( get_packages_permalink() ); } @@ -106,7 +107,7 @@ public function test_authentication_fails_with_missing_key() { $user = wp_get_current_user(); $this->assertSame( 0, $user->ID ); - $this->expectException( AuthenticationException::class ); + $this->expectException( WPDieException::class ); $this->go_to( get_packages_permalink() ); } @@ -120,7 +121,7 @@ public function test_authentication_fails_with_invalid_key() { $user = wp_get_current_user(); $this->assertSame( 0, $user->ID ); - $this->expectException( AuthenticationException::class ); + $this->expectException( WPDieException::class ); $this->go_to( get_packages_permalink() ); }