From eaa17c930934b78874da9614ae8084e95c8fc13a Mon Sep 17 00:00:00 2001 From: Zack Katz Date: Mon, 20 Feb 2023 12:26:57 -0500 Subject: [PATCH 1/2] Fix failing test by bumping PHP mocks --- tests/unit-tests/GravityView_Future_Test.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/unit-tests/GravityView_Future_Test.php b/tests/unit-tests/GravityView_Future_Test.php index 8de62e485..327fbd899 100644 --- a/tests/unit-tests/GravityView_Future_Test.php +++ b/tests/unit-tests/GravityView_Future_Test.php @@ -78,7 +78,7 @@ public function test_plugin_is_compatible() { $this->assertTrue( gravityview()->plugin->is_compatible() ); /** Simulate various other conditions, including failure conditions. */ - $GLOBALS['GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE'] = '7.0.99-hhvm'; + $GLOBALS['GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE'] = '7.2'; $GLOBALS['GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE'] = '4.8-alpha-39901'; $GLOBALS['GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE'] = '2.3.3.10-alpha'; $this->assertTrue( gravityview()->plugin->is_compatible_php() ); @@ -86,6 +86,9 @@ public function test_plugin_is_compatible() { $this->assertTrue( gravityview()->plugin->is_compatible_gravityforms() ); $this->assertTrue( gravityview()->plugin->is_compatible() ); + $GLOBALS['GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE'] = '7.1'; + $this->assertFalse( gravityview()->plugin->is_compatible_php() ); + $GLOBALS['GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE'] = '5.2'; $GLOBALS['GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE'] = '3.0'; $GLOBALS['GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE'] = '1.0'; From 3f2379dafe8c63df4c0b44f035203d7bea1b97ee Mon Sep 17 00:00:00 2001 From: Zack Katz Date: Mon, 20 Feb 2023 12:31:47 -0500 Subject: [PATCH 2/2] :facepalm: 7.2.0 !== 7.2 --- tests/unit-tests/GravityView_Future_Test.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit-tests/GravityView_Future_Test.php b/tests/unit-tests/GravityView_Future_Test.php index 327fbd899..491b36061 100644 --- a/tests/unit-tests/GravityView_Future_Test.php +++ b/tests/unit-tests/GravityView_Future_Test.php @@ -78,7 +78,7 @@ public function test_plugin_is_compatible() { $this->assertTrue( gravityview()->plugin->is_compatible() ); /** Simulate various other conditions, including failure conditions. */ - $GLOBALS['GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE'] = '7.2'; + $GLOBALS['GRAVITYVIEW_TESTS_PHP_VERSION_OVERRIDE'] = '7.2.0'; $GLOBALS['GRAVITYVIEW_TESTS_WP_VERSION_OVERRIDE'] = '4.8-alpha-39901'; $GLOBALS['GRAVITYVIEW_TESTS_GF_VERSION_OVERRIDE'] = '2.3.3.10-alpha'; $this->assertTrue( gravityview()->plugin->is_compatible_php() );