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 9393 $_php_version_no_dot = regsubst($php_version , ' \. ' , ' ' )
9494 if $apache::version::scl_httpd_version {
9595 $_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 ) {
9797 # RedHat + PHP 8 drop the major version in apache module name.
9898 $_lib = " ${libphp_prefix} .so"
9999 } else {
Original file line number Diff line number Diff line change 111111 elsif facts [ :os ] [ 'release' ] [ 'major' ] . to_i == 8
112112 it { is_expected . to contain_apache__mod ( 'php7' ) }
113113 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
114123 elsif facts [ :os ] [ 'release' ] [ 'major' ] . to_i >= 9
115124 it { is_expected . to contain_apache__mod ( 'php' ) }
116125 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