config->set('HTML.Allowed', 'span[class],div,p,strong,em'); $this->config->set('AutoFormat.RemoveSpansWithoutAttributes', true); } function testSingleSpan() { $this->assertResult( 'foo', 'foo' ); } function testSingleSpanWithAttributes() { $this->assertResult( 'foo', 'foo' ); } function testSingleNestedSpan() { $this->assertResult( '

foo

', '

foo

' ); } function testSingleNestedSpanWithAttributes() { $this->assertResult( '

foo

', '

foo

' ); } function testSpanWithChildren() { $this->assertResult( 'foo bar baz', 'foo bar baz' ); } function testSpanWithSiblings() { $this->assertResult( '

before inside after

', '

before inside after

' ); } function testNestedSpanWithSiblingsAndChildren() { $this->assertResult( '

a b c d e

', '

a b c d e

' ); } function testNestedSpansWithoutAttributes() { $this->assertResult( 'onetwothree', 'onetwothree' ); } function testDeeplyNestedSpan() { $this->assertResult( '
a b c
', '
a b c
' ); } function testSpanWithInvalidAttributes() { $this->assertResult( '

foo

', '

foo

' ); } function testNestedAlternateSpans() { $this->assertResult( 'a b c d e f ', 'a b c d e f ' ); } function testSpanWithSomeInvalidAttributes() { $this->assertResult( '

foo

', '

foo

' ); } } // vim: et sw=4 sts=4