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=6e525cdf6f9dfe748dc91c5c02694637384eef6d;hp=d04d9ba15428af7c51be0e33d5ef1ff627d3f115;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php b/web/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php index d04d9ba15..6e525cdf6 100644 --- a/web/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php +++ b/web/core/modules/dblog/tests/src/Functional/DbLogViewsTest.php @@ -2,7 +2,7 @@ namespace Drupal\Tests\dblog\Functional; -use Drupal\filter\Entity\FilterFormat; +use Drupal\views\Views; /** * Generate events and verify dblog entries; verify user access to log reports @@ -44,27 +44,16 @@ class DbLogViewsTest extends DbLogTest { } /** - * {@inheritdoc} + * Tests the empty text for the watchdog view is not using an input format. */ - 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(); + public function testEmptyText() { + $view = Views::getView('watchdog'); + $data = $view->storage->toArray(); + $area = $data['display']['default']['display_options']['empty']['area']; + + $this->assertEqual('text_custom', $area['plugin_id']); + $this->assertEqual('area_text_custom', $area['field']); + $this->assertEqual('No log messages available.', $area['content']); } }