diff --git a/TwigCS/tests/Ruleset/Generic/PunctuationSpacing/PunctuationSpacingTest.fixed.twig b/TwigCS/tests/Ruleset/Generic/PunctuationSpacing/PunctuationSpacingTest.fixed.twig new file mode 100644 index 0000000..4c5b5e2 --- /dev/null +++ b/TwigCS/tests/Ruleset/Generic/PunctuationSpacing/PunctuationSpacingTest.fixed.twig @@ -0,0 +1,6 @@ +{{ 1..10 }} +{{ foo.bar }} +{{ (foo) }} +{{ {'a': 'b', 'c': 'd'} }} +{% set a = [1, 2, 4] %} +{{ a|trans }} diff --git a/TwigCS/tests/Ruleset/Generic/PunctuationSpacing/PunctuationSpacingTest.php b/TwigCS/tests/Ruleset/Generic/PunctuationSpacing/PunctuationSpacingTest.php new file mode 100644 index 0000000..4ec9cc3 --- /dev/null +++ b/TwigCS/tests/Ruleset/Generic/PunctuationSpacing/PunctuationSpacingTest.php @@ -0,0 +1,36 @@ +checkSniff(new PunctuationSpacingSniff(), [ + [3 => 4], + [3 => 10], + [4 => 4], + [4 => 10], + [4 => 16], + [4 => 22], + [4 => 28], + [5 => 12], + [5 => 16], + [5 => 20], + [5 => 24], + [6 => 6], + [6 => 6], + ]); + } +} diff --git a/TwigCS/tests/Ruleset/Generic/PunctuationSpacing/PunctuationSpacingTest.twig b/TwigCS/tests/Ruleset/Generic/PunctuationSpacing/PunctuationSpacingTest.twig new file mode 100644 index 0000000..a5aa08d --- /dev/null +++ b/TwigCS/tests/Ruleset/Generic/PunctuationSpacing/PunctuationSpacingTest.twig @@ -0,0 +1,6 @@ +{{ 1..10 }} +{{ foo.bar }} +{{ ( foo ) }} +{{ { 'a' : 'b' , 'c' : 'd' } }} +{% set a = [ 1 , 2 , 4 ] %} +{{ a | trans }}