assertSame( $expected_result, $actual );
}
public function add_css_class_test_examples() {
return array(
'should add a class name to a vanilla h2 element' => array(
'
Hello World
',
'Hello World
',
),
'should not add a class name to a header element' => array(
'',
'',
),
'should not add a class name to a span element' => array(
'Hello World',
'Hello World',
),
'should not add a class name to an invalid h7 element' => array(
'Hello World',
'Hello World',
),
'should add a class name even when the class attribute is already defined' => array(
'Hello World
',
'Hello World
',
),
'should handle single quotes' => array(
"Hello World
",
'Hello World
',
),
'should handle single quotes with double quotes inside' => array(
"Hello World
",
'Hello World
',
),
'should not add a class name even when it is already defined' => array(
'Hello World
',
'Hello World
',
),
'should add a class name even when there are other HTML attributes present' => array(
'Hello World
',
'Hello World
',
),
'should add a class name even when the class attribute is already defined and has many entries' => array(
'Hello World
',
'Hello World
',
),
'should not add a class name to a nested h2' => array(
'Hello World
',
'Hello World
',
),
'should not add a class name to a nested h2 when the parent has another attribute' => array(
'Hello World
',
'Hello World
',
),
'should add a class name even when the class attribute is surrounded by other attributes' => array(
'Hello World
',
'Hello World
',
),
'should add a class name without getting confused when there is a tricky data-class attribute present' => array(
'Hello World
',
'Hello World
',
),
);
}
}