EditorUpdateTest.php in Zircon Profile 8
File
core/modules/editor/src/Tests/Update/EditorUpdateTest.php
View source
<?php
namespace Drupal\editor\Tests\Update;
use Drupal\system\Tests\Update\UpdatePathTestBase;
class EditorUpdateTest extends UpdatePathTestBase {
public function setDatabaseDumpFiles() {
$this->databaseDumpFiles = [
__DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
__DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.editor-editor_update_8001.php',
];
}
public function testEditorUpdate8001() {
$config_factory = $this->container
->get('config.factory');
$format_basic_html = $config_factory
->get('filter.format.basic_html');
$editor_basic_html = $config_factory
->get('editor.editor.basic_html');
$format_full_html = $config_factory
->get('filter.format.full_html');
$editor_full_html = $config_factory
->get('editor.editor.full_html');
$this
->assertTrue($format_basic_html
->get('status'));
$this
->assertFalse($editor_basic_html
->get('status'));
$this
->assertNotIdentical($format_basic_html
->get('status'), $editor_basic_html
->get('status'));
$this
->assertFalse($format_full_html
->get('status'));
$this
->assertTrue($editor_full_html
->get('status'));
$this
->assertNotIdentical($format_full_html
->get('status'), $editor_full_html
->get('status'));
$this
->runUpdates();
$format_basic_html = $config_factory
->get('filter.format.basic_html');
$editor_basic_html = $config_factory
->get('editor.editor.basic_html');
$format_full_html = $config_factory
->get('filter.format.full_html');
$editor_full_html = $config_factory
->get('editor.editor.full_html');
$this
->assertTrue($format_basic_html
->get('status'));
$this
->assertTrue($editor_basic_html
->get('status'));
$this
->assertIdentical($format_basic_html
->get('status'), $editor_basic_html
->get('status'));
$this
->assertFalse($format_full_html
->get('status'));
$this
->assertFalse($editor_full_html
->get('status'));
$this
->assertIdentical($format_full_html
->get('status'), $editor_full_html
->get('status'));
}
}