$: << 'cf_spec'
require 'cf_spec_helper'

describe 'CF PHP Buildpack' do
  subject(:app) { Machete.deploy_app(app_name, {env: {'COMPOSER_GITHUB_OAUTH_TOKEN' => ENV['COMPOSER_GITHUB_OAUTH_TOKEN']}}) }
  let(:browser) { Machete::Browser.new(app) }

  after do
    Machete::CF::DeleteApp.new.execute(app)
  end

  context 'deploying a basic PHP app' do
    let(:app_name) { 'php_app' }

    specify do
      expect(app).to be_running

      expect(app).to have_logged '-------> Buildpack version 3'
      expect(app).to have_logged 'Installing PHP'
      expect(app).to have_logged 'PHP 5.5'

      browser.visit_path('/')
      expect(browser).to have_body('PHP Version')

      assert_offline_mode_has_no_internet_traffic
    end
  end
end


$: << 'cf_spec'
require 'cf_spec_helper'

describe 'CF PHP Buildpack' do
  subject(:app) { Machete.deploy_app(app_name, {env: {'COMPOSER_GITHUB_OAUTH_TOKEN' => ENV['COMPOSER_GITHUB_OAUTH_TOKEN']}}) }
  let(:browser) { Machete::Browser.new(app) }

  after do
    Machete::CF::DeleteApp.new.execute(app)
  end

  context 'deploying a basic PHP app' do
    let(:app_name) { 'php_app' }

    specify do
      expect(app).to be_running

      expect(app).to have_logged '-------> Buildpack version 3'
      expect(app).to have_logged 'Installing PHP'
      expect(app).to have_logged 'PHP 5.5'

      browser.visit_path('/')
      expect(browser).to have_body 'PHP Version'
      expect(browser).not_to have_header 'X-Powered-By'

      assert_offline_mode_has_no_internet_traffic
    end
  end
end


Add integration test to see that PHP version is not exposed in app page header
Add integration test to see that PHP version is not exposed in app page header

[#95368312]

Signed-off-by: Colin Jackson <a89a308d481f83b953c5ad185298958072312fde@gmail.com>
