File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 93
93
$_php_version_no_dot = regsubst($php_version , ' \. ' , ' ' )
94
94
if $apache::version::scl_httpd_version {
95
95
$_lib = " librh-php${_php_version_no_dot}-php${_php_major}.so"
96
- } elsif ($facts [' os' ][' family' ] == ' RedHat' ) and ($_php_major == 8 ) {
96
+ } elsif ($facts [' os' ][' family' ] == ' RedHat' ) and (versioncmp( $php_version , ' 8 ' ) >= 0 ) {
97
97
# RedHat + PHP 8 drop the major version in apache module name.
98
98
$_lib = " ${libphp_prefix} .so"
99
99
} else {
Original file line number Diff line number Diff line change 111
111
elsif facts [ :os ] [ 'release' ] [ 'major' ] . to_i == 8
112
112
it { is_expected . to contain_apache__mod ( 'php7' ) }
113
113
it { is_expected . to contain_file ( 'php7.load' ) . with ( content : "LoadModule php7_module modules/libphp7.so\n " ) }
114
+
115
+ context 'with php8.0' do
116
+ let :params do
117
+ { php_version : '8.0' }
118
+ end
119
+
120
+ it { is_expected . to contain_apache__mod ( 'php' ) }
121
+ it { is_expected . to contain_file ( 'php.load' ) . with ( content : "LoadModule php_module modules/libphp.so\n " ) }
122
+ end
114
123
elsif facts [ :os ] [ 'release' ] [ 'major' ] . to_i >= 9
115
124
it { is_expected . to contain_apache__mod ( 'php' ) }
116
125
it { is_expected . to contain_file ( 'php.load' ) . with ( content : "LoadModule php_module modules/libphp.so\n " ) }
You can’t perform that action at this time.
0 commit comments