File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -783,7 +783,14 @@ jobs:
783783 $this->assertTrue(defined('SCG_PLUGIN_VERSION'), 'Plugin version constant should be defined');
784784 $this->assertTrue(defined('SCG_PLUGIN_URL'), 'Plugin URL constant should be defined');
785785 $this->assertTrue(defined('SCG_PLUGIN_PATH'), 'Plugin path constant should be defined');
786- $this->assertEquals('1.4.0', SCG_PLUGIN_VERSION, 'Plugin version should match expected version');
786+
787+ // Extract version from plugin header dynamically to test against latest commit
788+ $plugin_file = dirname( dirname( __FILE__ ) ) . '/free-gift-bulk-coupon-generator.php';
789+ $plugin_data = get_file_data( $plugin_file, array( 'Version' => 'Version' ) );
790+ $expected_version = $plugin_data['Version'];
791+
792+ $this->assertNotEmpty($expected_version, 'Plugin header should contain version');
793+ $this->assertEquals($expected_version, SCG_PLUGIN_VERSION, 'Plugin version constant should match header version in latest commit');
787794 }
788795
789796 public function test_plugin_instance() {
You can’t perform that action at this time.
0 commit comments