config->set('HTML.Allowed', 'span[class],div,p,strong,em'); $this->config->set('AutoFormat.RemoveSpansWithoutAttributes', true); } public function testSingleSpan() { $this->assertResult( 'foo', 'foo' ); } public function testSingleSpanWithAttributes() { $this->assertResult( ' ', ' ' ); } public function testSingleNestedSpan() { $this->assertResult( '
foo
', 'foo
' ); } public function testSingleNestedSpanWithAttributes() { $this->assertResult( '', '
' ); } public function testSpanWithChildren() { $this->assertResult( 'foo bar baz', 'foo bar baz' ); } public function testSpanWithSiblings() { $this->assertResult( '
before inside after
', 'before inside after
' ); } public function testNestedSpanWithSiblingsAndChildren() { $this->assertResult( 'a b c d e
', 'a b c d e
' ); } public function testNestedSpansWithoutAttributes() { $this->assertResult( 'onetwothree', 'onetwothree' ); } public function testDeeplyNestedSpan() { $this->assertResult( 'foo
', 'foo
' ); } public function testNestedAlternateSpans() { $this->assertResult( 'a b c d e f ', 'a b c d e f ' ); } public function testSpanWithSomeInvalidAttributes() { $this->assertResult( '', '
' ); } } // vim: et sw=4 sts=4