diff --git tests/phpunit/tests/formatting/WpHtmlSplit.php tests/phpunit/tests/formatting/WpHtmlSplit.php
index 356dcb8..38b7929 100644
|
|
class Tests_Formatting_WpHtmlSplit extends WP_UnitTestCase { |
36 | 36 | } |
37 | 37 | |
38 | 38 | /** |
| 39 | * Crazy but valid functionality goes here. |
| 40 | * |
| 41 | * @dataProvider data_crazy_features |
| 42 | */ |
| 43 | function test_crazy_features( $input, $output ) { |
| 44 | return $this->assertEquals( $output, wp_html_split( $input ) ); |
| 45 | } |
| 46 | |
| 47 | function data_crazy_features() { |
| 48 | return array( |
| 49 | array( |
| 50 | '<p class="<><<<>><>">abcd</p>', |
| 51 | array( '', '<p class="<><<<>><>">', 'abcd', '</p>', '' ), |
| 52 | ), |
| 53 | array( |
| 54 | '<div id="<p>">abcd</div>', |
| 55 | array( '', '<div id="<p>">', 'abcd', '</div>', '' ), |
| 56 | ), |
| 57 | ); |
| 58 | } |
| 59 | |
| 60 | /** |
39 | 61 | * Automated performance testing of the main regex. |
40 | 62 | * |
41 | 63 | * @dataProvider data_whole_posts |