Validating Plugin Detection Framework in WPScan
This test suite validates the plugin detection functionality in WPScan, focusing on the base finder class and its associated detection methods. It ensures the correct initialization and configuration of plugin finders while verifying the expected finder classes are properly registered.
Test Coverage Overview
Implementation Analysis
Technical Details
Best Practices Demonstrated
wpscanteam/wpscan
spec/app/finders/plugins_spec.rb
# frozen_string_literal: true
describe WPScan::Finders::Plugins::Base do
subject(:plugins) { 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(plugins.finders.map { |f| f.class.to_s.demodulize })
.to eq %w[UrlsInHomepage UrlsIn404Page HeaderPattern Comment Xpath BodyPattern JavascriptVar KnownLocations]
end
end
end