From 92bce4e152e896b67a2984b2e2c08b41a086ba25 Mon Sep 17 00:00:00 2001 From: Paulo Pinto Date: Wed, 10 Jan 2024 12:55:48 +0000 Subject: [PATCH] Remove calls to deprecated assertInternalType() See https://github.com/sebastianbergmann/phpunit/issues/3368 --- tests/phpunit/testcases/test_meta.php | 4 ++-- tests/phpunit/testcases/tests_things/test_thing_original.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/testcases/test_meta.php b/tests/phpunit/testcases/test_meta.php index 5ed4d5bbd9..41755d30c0 100644 --- a/tests/phpunit/testcases/test_meta.php +++ b/tests/phpunit/testcases/test_meta.php @@ -62,7 +62,7 @@ function test_update_meta_should_set_meta() { } function test_gp_update_meta_updates_an_existing_meta_value() { - $this->assertInternalType( 'int', gp_update_meta( '1', 'key', 'value-1', 'thing' ) ); + $this->assertIsInt( gp_update_meta( '1', 'key', 'value-1', 'thing' ) ); $this->assertTrue( gp_update_meta( '1', 'key', 'value-2', 'thing' ) ); $this->assertSame( 'value-2', gp_get_meta( 'thing', '1', 'key' ) ); } @@ -84,7 +84,7 @@ function test_delete_meta_with_value_should_delete_only_meta_with_value() { } function test_gp_update_meta_does_not_update_if_prev_value_equals_new_value() { - $this->assertInternalType( 'int', gp_update_meta( '1', 'foo', 'foo', 'thing' ) ); + $this->assertIsInt( gp_update_meta( '1', 'foo', 'foo', 'thing' ) ); $this->assertTrue( gp_update_meta( '1', 'foo', 'foo', 'thing' ) ); // @todo Is this the correct return value? } diff --git a/tests/phpunit/testcases/tests_things/test_thing_original.php b/tests/phpunit/testcases/tests_things/test_thing_original.php index 596de69bd4..6ec686bb24 100644 --- a/tests/phpunit/testcases/tests_things/test_thing_original.php +++ b/tests/phpunit/testcases/tests_things/test_thing_original.php @@ -273,7 +273,7 @@ function test_return_types_of_count_by_project_id() { $this->assertSame( 2, $total ); $all = GP::$original->count_by_project_id( $project->id, 'all' ); - $this->assertInternalType( 'object', $all ); + $this->assertIsObject( $all ); $this->assertSame( 2, $all->total ); $this->assertSame( 1, $all->hidden ); $this->assertSame( 1, $all->public );