diff --git a/lib/app.rb b/lib/app.rb index 3b59b526e1..2f6193fe36 100644 --- a/lib/app.rb +++ b/lib/app.rb @@ -30,7 +30,7 @@ class App < Sinatra::Application set :docs_origin, File.join('', docs_prefix) set :docs_path, File.join(public_folder, docs_prefix) set :docs_manifest_path, File.join(docs_path, 'docs.json') - set :default_docs, %w(css dom html http javascript) + set :default_docs, %w(css dom html http javascript php) set :news_path, File.join(root, assets_prefix, 'javascripts', 'news.json') set :csp, false diff --git a/lib/docs.rb b/lib/docs.rb index a09aae76df..299ab25e19 100644 --- a/lib/docs.rb +++ b/lib/docs.rb @@ -44,7 +44,7 @@ def self.all_versions end def self.defaults - %w(css dom html http javascript).map(&method(:find)) + %w(css dom html http javascript php).map(&method(:find)) end def self.installed diff --git a/test/app_test.rb b/test/app_test.rb index 4b5e4c3297..1103f72421 100644 --- a/test/app_test.rb +++ b/test/app_test.rb @@ -15,6 +15,11 @@ def app current_session.env('HTTPS', 'on') end + it 'includes PHP in the default documentation set' do + assert_includes App.settings.default_docs, 'php' + assert_includes Docs.defaults.map(&:name), 'PHP' + end + it 'redirects to HTTPS' do get 'http://example.com/test?q=1', {}, 'HTTPS' => 'off' assert last_response.redirect?