Skip to content
Snippets Groups Projects
Commit 0b2bf266 authored by Kurucz István's avatar Kurucz István
Browse files

Complete Filter format migration test.

parent 47830ca4
No related branches found
No related tags found
No related merge requests found
......@@ -74,4 +74,33 @@ class MigrateFilterFormatTest extends MigrateDrupal5TestBase {
$filter_config = FilterFormat::load('filtered_html')->filters('filter_url')->getConfiguration();
$this->assertSame($filter_plugin->getPluginDefinition()['settings']['filter_url_length'], $filter_config['settings']['filter_url_length']);
}
/**
* Test 'Full HTML' filter format.
*/
public function testFullHtmlFilterFormat() {
$this->assertEntity('full_html', 'Full HTML', ['filter_autop' => 1, 'filter_url' => 0]);
}
/**
* Test 'PHP code' filter format.
*/
public function testPhpCodeFilterFormat() {
$this->assertEntity('php_code', 'PHP code', ['filter_html_escape' => 10]);
}
/**
* Test 'Customized format' filter format.
*/
public function testCustomizedFormatFilterFormat() {
$this->assertEntity('customized_format', 'Customized format', ['filter_html' => 5, 'filter_autop' => 2, 'filter_html_escape' => -10, 'filter_url' => 0]);
// filter_html
$filter_config = FilterFormat::load('customized_format')->filters('filter_html')->getConfiguration();
$this->assertSame('<a href hreflang> <em> <strong> <cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <test1> <test2>', $filter_config['settings']['allowed_html']);
$this->assertEquals(TRUE, $filter_config['settings']['filter_html_help']);
$this->assertEquals(TRUE, $filter_config['settings']['filter_html_nofollow']);
// filter_url
$filter_config = FilterFormat::load('customized_format')->filters('filter_url')->getConfiguration();
$this->assertSame(123, $filter_config['settings']['filter_url_length']);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment