X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fdblog%2Ftests%2Fsrc%2FFunctional%2FDbLogViewsTest.php;fp=web%2Fcore%2Fmodules%2Fdblog%2Ftests%2Fsrc%2FFunctional%2FDbLogViewsTest.php;h=d04d9ba15428af7c51be0e33d5ef1ff627d3f115;hp=0000000000000000000000000000000000000000;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php b/web/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php new file mode 100644 index 000000000..d04d9ba15 --- /dev/null +++ b/web/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php @@ -0,0 +1,70 @@ +xpath('.//table[contains(@class, "views-view-table")]/tbody/tr'); + } + + /** + * {@inheritdoc} + */ + protected function filterLogsEntries($type = NULL, $severity = NULL) { + $query = []; + if (isset($type)) { + $query['type[]'] = $type; + } + if (isset($severity)) { + $query['severity[]'] = $severity; + } + + $this->drupalGet('admin/reports/dblog', ['query' => $query]); + } + + /** + * {@inheritdoc} + */ + public function testDBLogAddAndClear() { + // Is necesary to create the basic_html format because if absent after + // delete the logs, a new log entry is created indicating that basic_html + // format do not exists. + $basic_html_format = FilterFormat::create([ + 'format' => 'basic_html', + 'name' => 'Basic HTML', + 'filters' => [ + 'filter_html' => [ + 'status' => 1, + 'settings' => [ + 'allowed_html' => '


', + ], + ], + ], + ]); + $basic_html_format->save(); + + parent::testDBLogAddAndClear(); + } + +}