Skip to content

Improve developer experience with closing tags #435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Improve test cases
  • Loading branch information
fredden committed May 26, 2023
commit 48ff5f2a52cccdec90bd78287ffe7a69c28f61c0
7 changes: 7 additions & 0 deletions Magento2/Tests/Html/HtmlClosingVoidTagsUnitTest.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
<hr/>
<img src="" alt=""/>
<input type="text" id="test_input"/>
<input type="text"
id="multi-line-input"
placeholder="Alert should be on last line"
/>
<input type="text"
id="multi-line-input2"
placeholder="Alert should be on last line" />
<link/>
<meta/>
<video>
Expand Down
7 changes: 7 additions & 0 deletions Magento2/Tests/Html/HtmlClosingVoidTagsUnitTest.inc.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
<hr>
<img src="" alt="">
<input type="text" id="test_input">
<input type="text"
id="multi-line-input"
placeholder="Alert should be on last line"
/>
<input type="text"
id="multi-line-input2"
placeholder="Alert should be on last line" />
<link>
<meta>
<video>
Expand Down
11 changes: 6 additions & 5 deletions Magento2/Tests/Html/HtmlClosingVoidTagsUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public function getErrorList()
public function getWarningList()
{
return [
1 => 2,
10 => 1,
11 => 1,
14 => 1,
Expand All @@ -32,13 +33,13 @@ public function getWarningList()
22 => 1,
23 => 1,
24 => 1,
25 => 1,
26 => 1,
28 => 1,
29 => 1,
31 => 1,
32 => 1,
33 => 1,
35 => 1,
36 => 1,
38 => 1,
39 => 1,
40 => 1,
];
}
}
12 changes: 12 additions & 0 deletions Magento2/Tests/Html/HtmlSelfClosingTagsUnitTest.1.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
<hr/>
<img src="" alt=""/>
<input type="text" id="test_input"/>
<input type="text"
id="multi-line-input"
placeholder="Alert should be on last line"
/>
<input type="text"
id="multi-line-input2"
placeholder="Alert should be on last line" />
<link/>
<meta/>
<video>
Expand All @@ -31,6 +38,11 @@
<wbr/>

<label for="test_input"/>
<label
for="multi-line-input"
/>
<label
for="multi-line-input2" />
<style type="text/css"/>
<div/>
<span/>
Expand Down
12 changes: 12 additions & 0 deletions Magento2/Tests/Html/HtmlSelfClosingTagsUnitTest.1.inc.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
<hr/>
<img src="" alt=""/>
<input type="text" id="test_input"/>
<input type="text"
id="multi-line-input"
placeholder="Alert should be on last line"
/>
<input type="text"
id="multi-line-input2"
placeholder="Alert should be on last line" />
<link/>
<meta/>
<video>
Expand All @@ -31,6 +38,11 @@
<wbr/>

<label for="test_input"></label>
<label
for="multi-line-input"
/>
<label
for="multi-line-input2" />
<style type="text/css"></style>
<div></div>
<span></span>
Expand Down
21 changes: 11 additions & 10 deletions Magento2/Tests/Html/HtmlSelfClosingTagsUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,18 @@ class HtmlSelfClosingTagsUnitTest extends AbstractSniffUnitTest
public function getErrorList()
{
return [
33 => 1,
34 => 1,
35 => 1,
36 => 1,
37 => 1,
38 => 1,
39 => 1,
1 => 2,
40 => 1,
41 => 1,
42 => 1,
43 => 1,
46 => 1,
47 => 1,
48 => 1,
49 => 1,
50 => 1,
51 => 1,
52 => 1,
53 => 1,
54 => 1,
55 => 1,
];
}

Expand Down