diff --git a/test/WhatDidTheySayAdminTest.php b/test/WhatDidTheySayAdminTest.php
index d08a4f6..0a0295d 100644
--- a/test/WhatDidTheySayAdminTest.php
+++ b/test/WhatDidTheySayAdminTest.php
@@ -128,6 +128,56 @@ class WhatDidTheySayAdminTest extends PHPUnit_Framework_TestCase {
$this->assertEquals(false, $admin->import_transcripts('en'));
}
+
+ function providerTestCleanChild() {
+ return array(
+ array(
+ array(
+ 'script' => 'test',
+ 'style' => 'test',
+ 'link' => 'removetest',
+ 'keep' => 'removetest'
+ ),
+ array(
+ 'allow_html' => true
+ ),
+ array(
+ 'script' => 'test',
+ 'style' => 'test',
+ 'link' => 'test',
+ 'keep' => 'removetest'
+ ),
+ ),
+ array(
+ array(
+ 'remove' => 'removetest',
+ 'children' => array(
+ 'alsoremove' => 'removetest'
+ )
+ ),
+ array(
+ 'allow_html' => false
+ ),
+ array(
+ 'remove' => 'removetest',
+ 'children' => array(
+ 'alsoremove' => 'removetest',
+ )
+ ),
+ ),
+ );
+ }
+
+ /**
+ * @dataProvider providerTestCleanChild
+ */
+ function testCleanChild($nodes, $options, $expected_result) {
+ $admin = new WhatDidTheySayAdmin();
+
+ update_option('what-did-they-say-options', $options);
+
+ $this->assertEquals($expected_result, $admin->_clean_child($nodes));
+ }
}
?>
\ No newline at end of file