diff --git a/tests/phpunit/test-setup.php b/tests/phpunit/test-setup.php
index <HASH>..<HASH> 100644
--- a/tests/phpunit/test-setup.php
+++ b/tests/phpunit/test-setup.php
@@ -270,7 +270,7 @@ class Extended_CPT_Test_Setup extends Extended_CPT_Test {
 		try {
 			register_extended_post_type( 'public_taxonomy' );
 			$this->fail( 'register_extended_post_type() should trigger an error when registering a post type which clashes with a taxonomy' );
-		} catch ( PHPUnit_Framework_Error $e ) {
+		} catch ( \PHPUnit\Framework\Error\Error $e ) {
 			$this->assertContains( 'public_taxonomy', $e->getMessage() );
 			$this->assertFalse( post_type_exists( 'public_taxonomy' ) );
 		}
@@ -308,7 +308,7 @@ class Extended_CPT_Test_Setup extends Extended_CPT_Test {
 		try {
 			register_extended_post_type( $name );
 			$this->fail( 'register_extended_post_type() should trigger an error when registering a post type which causes an error' );
-		} catch ( PHPUnit_Framework_Error $e ) {
+		} catch ( \PHPUnit\Framework\Error\Error $e ) {
 			$this->assertContains( "$max_length", $e->getMessage() );
 		}
Update an expected PHPUnit exception name.