public function CkeditorCodeMirrorBasicTest::testCheckStatusReportPage in CKEditor CodeMirror 8
Same name and namespace in other branches
- 8.2 tests/src/Functional/CkeditorCodeMirrorBasicTest.php \Drupal\Tests\ckeditor_codemirror\Functional\CkeditorCodeMirrorBasicTest::testCheckStatusReportPage()
Check the library status on "Status report" page.
File
- tests/
src/ Functional/ CkeditorCodeMirrorBasicTest.php, line 80
Class
- CkeditorCodeMirrorBasicTest
- Test enabling the module and adding source highlighting to a text format.
Namespace
Drupal\Tests\ckeditor_codemirror\FunctionalCode
public function testCheckStatusReportPage() {
module_load_include('install', 'ckeditor_codemirror');
$this
->drupalLogin($this->privilegedUser);
$this
->drupalGet('admin/reports/status');
$library_path = _ckeditor_codemirror_get_library_path();
if (file_exists(DRUPAL_ROOT . '/' . $library_path . '/codemirror/plugin.js')) {
$this
->assertSession()
->responseContains(t('CKEditor CodeMirror plugin version %version installed at %path.', [
'%path' => base_path() . $library_path,
'%version' => _ckeditor_codemirror_get_version(),
]));
}
else {
$this
->assertSession()
->pageTextContains(t('CKEditor CodeMirror plugin was not found.'));
}
}