Debug.log detection if it contains only PHP notices
This commit is contained in:
@@ -106,7 +106,7 @@ class WpTarget
|
|||||||
end
|
end
|
||||||
|
|
||||||
def has_debug_log?
|
def has_debug_log?
|
||||||
Browser.instance.get(debug_log_url()).body[%r{\[[^\]]+\] PHP (?:Warning|Error):}] ? true : false
|
Browser.instance.get(debug_log_url()).body[%r{\[[^\]]+\] PHP (?:Warning|Error|Notice):}] ? true : false
|
||||||
end
|
end
|
||||||
|
|
||||||
def debug_log_url
|
def debug_log_url
|
||||||
|
|||||||
@@ -158,5 +158,10 @@ describe WpTarget do
|
|||||||
@fixture = fixtures_dir + "/debug.log"
|
@fixture = fixtures_dir + "/debug.log"
|
||||||
@expected = true
|
@expected = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "should also detect it if there are PHP notice" do
|
||||||
|
@fixture = fixtures_dir + "/debug-notice.log"
|
||||||
|
@expected = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user