1
0
Эх сурвалжийг харах

Update PHPUnit documentation (12.0)

Simon Legner 9 сар өмнө
parent
commit
e2336a1ce3

+ 1 - 1
lib/docs/filters/phpunit/clean_html.rb

@@ -2,7 +2,7 @@ module Docs
   class Phpunit
     class CleanHtmlFilter < Filter
       def call
-        @doc = at_css('.section') if not root_page?
+        @doc = at_css('section') if not root_page?
 
         css('pre').each do |node|
           node['class'] = 'highlight'

+ 10 - 1
lib/docs/scrapers/phpunit.rb

@@ -17,12 +17,21 @@ module Docs
     options[:title] = false
 
     options[:attribution] = <<-HTML
-      &copy; 2005&ndash;2020 Sebastian Bergmann<br>
+      &copy; 2005&ndash;2025 Sebastian Bergmann<br>
       Licensed under the Creative Commons Attribution 3.0 Unported License.
     HTML
 
     FILTERS = %w(phpunit/clean_html phpunit/entries title)
 
+    version do
+      self.release = '12.0'
+      self.base_url = "https://docs.phpunit.de/en/#{release}/"
+
+      html_filters.push FILTERS
+
+      options[:container] = '.document'
+    end
+
     version '9' do
       self.release = '9.5'
       self.base_url = "https://phpunit.readthedocs.io/en/#{release}/"