Skip to content

Commit 76c5092

Browse files
committed
Add a test for HTML5 data attributes to testAssertNotHasElementWithAttributes()
1 parent 9723456 commit 76c5092

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/MarkupAssertionsTraitTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function testAssertNotHasElementWithAttributes()
7878
'type' => 'email',
7979
'value' => 'test@example.com',
8080
],
81-
'<label>City</label><br><input type="text" value="New York" />'
81+
'<label>City</label><br><input type="text" value="New York" data-foo="bar" />'
8282
);
8383
}
8484

@@ -129,6 +129,12 @@ public function attributeProvider()
129129
],
130130
'[checked]',
131131
],
132+
'Data attribute' => [
133+
[
134+
'data-foo' => 'bar',
135+
],
136+
'[data-foo="bar"]',
137+
],
132138
'Value contains quotes' => [
133139
[
134140
'name' => 'Austin "Danger" Powers',

0 commit comments

Comments
 (0)