diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.html b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.html
new file mode 100644
index 0000000000..dfa5670f0e
--- /dev/null
+++ b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.html
@@ -0,0 +1,77 @@
+
+
+ GeneratorTest Coding Standards
+
+
+
+ GeneratorTest Coding Standards
+
+ Code element at wrong level
+
+
+
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.md b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.md
new file mode 100644
index 0000000000..669ea0f4c6
--- /dev/null
+++ b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.md
@@ -0,0 +1,5 @@
+# GeneratorTest Coding Standard
+
+## Code element at wrong level
+
+Documentation generated on *REDACTED* by [PHP_CodeSniffer *VERSION*](https://github.com/PHPCSStandards/PHP_CodeSniffer)
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.txt b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.txt
new file mode 100644
index 0000000000..940832ced1
--- /dev/null
+++ b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.txt
@@ -0,0 +1,5 @@
+
+--------------------------------------------------------------
+| GENERATORTEST CODING STANDARD: CODE ELEMENT AT WRONG LEVEL |
+--------------------------------------------------------------
+
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedOneElmAtWrongLevel.html b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedOneElmAtWrongLevel.html
new file mode 100644
index 0000000000..dc86a6c42f
--- /dev/null
+++ b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedOneElmAtWrongLevel.html
@@ -0,0 +1,78 @@
+
+
+ GeneratorTest Coding Standards
+
+
+
+ GeneratorTest Coding Standards
+
+ One element correct, one element wrong level
+ This is a standard block at the correct level.
+
+
+
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedOneElmAtWrongLevel.md b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedOneElmAtWrongLevel.md
new file mode 100644
index 0000000000..f6eda21036
--- /dev/null
+++ b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedOneElmAtWrongLevel.md
@@ -0,0 +1,6 @@
+# GeneratorTest Coding Standard
+
+## One element correct, one element wrong level
+This is a standard block at the correct level.
+
+Documentation generated on *REDACTED* by [PHP_CodeSniffer *VERSION*](https://github.com/PHPCSStandards/PHP_CodeSniffer)
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedOneElmAtWrongLevel.txt b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedOneElmAtWrongLevel.txt
new file mode 100644
index 0000000000..4d1aaeaa12
--- /dev/null
+++ b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedOneElmAtWrongLevel.txt
@@ -0,0 +1,7 @@
+
+-------------------------------------------------------------------------------
+| GENERATORTEST CODING STANDARD: ONE ELEMENT CORRECT, ONE ELEMENT WRONG LEVEL |
+-------------------------------------------------------------------------------
+
+This is a standard block at the correct level.
+
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedSuperfluousCodeElement.html b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedSuperfluousCodeElement.html
new file mode 100644
index 0000000000..967381e3a9
--- /dev/null
+++ b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedSuperfluousCodeElement.html
@@ -0,0 +1,88 @@
+
+
+ GeneratorTest Coding Standards
+
+
+
+ GeneratorTest Coding Standards
+
+ Superfluous code element
+ This is a standard block.
+
+
+ Valid: Checking handling of blank lines. |
+ Invalid: Checking handling of blank lines. |
+
+
+ $valid = true; |
+ $invalid = true; |
+
+
+
+
+
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedSuperfluousCodeElement.md b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedSuperfluousCodeElement.md
new file mode 100644
index 0000000000..131c6cc45a
--- /dev/null
+++ b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedSuperfluousCodeElement.md
@@ -0,0 +1,24 @@
+# GeneratorTest Coding Standard
+
+## Superfluous code element
+This is a standard block.
+
+
+ Valid: Checking handling of blank lines. |
+ Invalid: Checking handling of blank lines. |
+
+
+
+
+ $valid = true;
+
+ |
+
+
+ $invalid = true;
+
+ |
+
+
+
+Documentation generated on *REDACTED* by [PHP_CodeSniffer *VERSION*](https://github.com/PHPCSStandards/PHP_CodeSniffer)
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedSuperfluousCodeElement.txt b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedSuperfluousCodeElement.txt
new file mode 100644
index 0000000000..1307eebfd1
--- /dev/null
+++ b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedSuperfluousCodeElement.txt
@@ -0,0 +1,13 @@
+
+-----------------------------------------------------------
+| GENERATORTEST CODING STANDARD: SUPERFLUOUS CODE ELEMENT |
+-----------------------------------------------------------
+
+This is a standard block.
+
+----------------------------------------- CODE COMPARISON ------------------------------------------
+| Valid: Checking handling of blank lines. | Invalid: Checking handling of blank lines. |
+----------------------------------------------------------------------------------------------------
+| $valid = true; | $invalid = true; |
+----------------------------------------------------------------------------------------------------
+
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.html b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.html
new file mode 100644
index 0000000000..770d08bbc7
--- /dev/null
+++ b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.html
@@ -0,0 +1,77 @@
+
+
+ GeneratorTest Coding Standards
+
+
+
+ GeneratorTest Coding Standards
+
+ Unknown element
+
+
+
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.md b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.md
new file mode 100644
index 0000000000..a8be8f9928
--- /dev/null
+++ b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.md
@@ -0,0 +1,5 @@
+# GeneratorTest Coding Standard
+
+## Unknown element
+
+Documentation generated on *REDACTED* by [PHP_CodeSniffer *VERSION*](https://github.com/PHPCSStandards/PHP_CodeSniffer)
diff --git a/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.txt b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.txt
new file mode 100644
index 0000000000..3e2f564720
--- /dev/null
+++ b/tests/Core/Generators/Expectations/ExpectedOutputUnsupportedUnknownElement.txt
@@ -0,0 +1,5 @@
+
+--------------------------------------------------
+| GENERATORTEST CODING STANDARD: UNKNOWN ELEMENT |
+--------------------------------------------------
+
diff --git a/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Unsupported/ElementAtWrongLevelStandard.xml b/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Unsupported/ElementAtWrongLevelStandard.xml
new file mode 100644
index 0000000000..68519dd2be
--- /dev/null
+++ b/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Unsupported/ElementAtWrongLevelStandard.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
diff --git a/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Unsupported/OneElmAtWrongLevelStandard.xml b/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Unsupported/OneElmAtWrongLevelStandard.xml
new file mode 100644
index 0000000000..6c1dd164aa
--- /dev/null
+++ b/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Unsupported/OneElmAtWrongLevelStandard.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
diff --git a/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Unsupported/SuperfluousCodeElementStandard.xml b/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Unsupported/SuperfluousCodeElementStandard.xml
new file mode 100644
index 0000000000..333786a337
--- /dev/null
+++ b/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Unsupported/SuperfluousCodeElementStandard.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Unsupported/UnknownElementStandard.xml b/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Unsupported/UnknownElementStandard.xml
new file mode 100644
index 0000000000..c9ec3227fa
--- /dev/null
+++ b/tests/Core/Generators/Fixtures/StandardWithDocs/Docs/Unsupported/UnknownElementStandard.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Unsupported/ElementAtWrongLevelSniff.php b/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Unsupported/ElementAtWrongLevelSniff.php
new file mode 100644
index 0000000000..6ed5c2be69
--- /dev/null
+++ b/tests/Core/Generators/Fixtures/StandardWithDocs/Sniffs/Unsupported/ElementAtWrongLevelSniff.php
@@ -0,0 +1,12 @@
+ 'StandardWithDocs.Content.CodeComparisonLineLength',
'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputCodeComparisonLineLength.html',
],
+ 'Unsupported: element at the wrong level' => [
+ 'sniffs' => 'StandardWithDocs.Unsupported.ElementAtWrongLevel',
+ 'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.html',
+ ],
+ 'Unsupported: one correct elm, one at wrong level' => [
+ 'sniffs' => 'StandardWithDocs.Unsupported.OneElmAtWrongLevel',
+ 'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputUnsupportedOneElmAtWrongLevel.html',
+ ],
+ 'Unsupported: superfluous code element' => [
+ 'sniffs' => 'StandardWithDocs.Unsupported.SuperfluousCodeElement',
+ 'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputUnsupportedSuperfluousCodeElement.html',
+ ],
+ 'Unsupported: unknown element' => [
+ 'sniffs' => 'StandardWithDocs.Unsupported.UnknownElement',
+ 'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputUnsupportedUnknownElement.html',
+ ],
];
}//end dataDocSpecifics()
diff --git a/tests/Core/Generators/MarkdownTest.php b/tests/Core/Generators/MarkdownTest.php
index 515b832c59..54f60d075e 100644
--- a/tests/Core/Generators/MarkdownTest.php
+++ b/tests/Core/Generators/MarkdownTest.php
@@ -173,6 +173,22 @@ public static function dataDocSpecifics()
'sniffs' => 'StandardWithDocs.Content.CodeComparisonLineLength',
'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputCodeComparisonLineLength.md',
],
+ 'Unsupported: element at the wrong level' => [
+ 'sniffs' => 'StandardWithDocs.Unsupported.ElementAtWrongLevel',
+ 'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.md',
+ ],
+ 'Unsupported: one correct elm, one at wrong level' => [
+ 'sniffs' => 'StandardWithDocs.Unsupported.OneElmAtWrongLevel',
+ 'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputUnsupportedOneElmAtWrongLevel.md',
+ ],
+ 'Unsupported: superfluous code element' => [
+ 'sniffs' => 'StandardWithDocs.Unsupported.SuperfluousCodeElement',
+ 'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputUnsupportedSuperfluousCodeElement.md',
+ ],
+ 'Unsupported: unknown element' => [
+ 'sniffs' => 'StandardWithDocs.Unsupported.UnknownElement',
+ 'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputUnsupportedUnknownElement.md',
+ ],
];
}//end dataDocSpecifics()
diff --git a/tests/Core/Generators/TextTest.php b/tests/Core/Generators/TextTest.php
index fd7388d256..b0c5f2807f 100644
--- a/tests/Core/Generators/TextTest.php
+++ b/tests/Core/Generators/TextTest.php
@@ -173,6 +173,22 @@ public static function dataDocSpecifics()
'sniffs' => 'StandardWithDocs.Content.CodeComparisonLineLength',
'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputCodeComparisonLineLength.txt',
],
+ 'Unsupported: element at the wrong level' => [
+ 'sniffs' => 'StandardWithDocs.Unsupported.ElementAtWrongLevel',
+ 'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputUnsupportedElementAtWrongLevel.txt',
+ ],
+ 'Unsupported: one correct elm, one at wrong level' => [
+ 'sniffs' => 'StandardWithDocs.Unsupported.OneElmAtWrongLevel',
+ 'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputUnsupportedOneElmAtWrongLevel.txt',
+ ],
+ 'Unsupported: superfluous code element' => [
+ 'sniffs' => 'StandardWithDocs.Unsupported.SuperfluousCodeElement',
+ 'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputUnsupportedSuperfluousCodeElement.txt',
+ ],
+ 'Unsupported: unknown element' => [
+ 'sniffs' => 'StandardWithDocs.Unsupported.UnknownElement',
+ 'pathToExpected' => __DIR__.'/Expectations/ExpectedOutputUnsupportedUnknownElement.txt',
+ ],
];
}//end dataDocSpecifics()