Testing Main Theme Detection Framework in WPScan
This test suite validates the main theme detection functionality in WPScan, focusing on the base finder class and its associated finder methods. The tests ensure proper initialization and verification of theme detection mechanisms across different page contexts.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
wpscanteam/wpscan
spec/app/finders/main_theme_spec.rb
# frozen_string_literal: true
describe WPScan::Finders::MainTheme::Base do
subject(:main_theme) { described_class.new(target) }
let(:target) { WPScan::Target.new(url) }
let(:url) { 'http://ex.lo/' }
describe '#finders' do
it 'contains the expected finders' do
expect(main_theme.finders.map { |f| f.class.to_s.demodulize })
.to eq %w[CssStyleInHomepage CssStyleIn404Page WooFrameworkMetaGenerator UrlsInHomepage UrlsIn404Page]
end
end
end