Skip to content

Commit

Permalink
add tests for php5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Feb 16, 2018
1 parent 1580e72 commit 2fb88e6
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion spec/acceptance/php_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'spec_helper_acceptance'

describe 'php' do
it 'works with defaults' do
it 'applies' do
pp = 'include php'
# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
Expand All @@ -23,3 +23,35 @@
end
end
end
describe 'with specific php version' do
it 'works with 5.6' do
pp = <<-EOS
class { 'php::globals':
php_version => '5.6',
}
-> class { 'php':
ensure => 'present',
manage_repos => true,
fpm => true,
dev => true,
composer => true,
pear => true,
phpunit => false,
}
EOS
# Run it twice and test for idempotency
apply_manifest(pp, catch_failures: true)
apply_manifest(pp, catch_changes: true)
end

case default[:platform]
when %r{16.04}
describe package('php5.6-fpm') do
it { is_expected.to be_installed }
end
when %r{14.04}
describe package('php5.6-fpm') do
it { is_expected.to be_installed }
end
end
end

0 comments on commit 2fb88e6

Please sign in to comment.