Skip to content
Merged
Changes from all commits
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
14 changes: 13 additions & 1 deletion tests/Core/Util/Common/GetSniffCodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public static function dataGetSniffCode()
'expected' => 'MyStandard.PHP.MyName',
],
'Test in external standard without namespace prefix' => [
'fqnClass' => 'MyStandard\\Tests\\PHP\\MyNameSniff',
'fqnClass' => 'MyStandard\\Tests\\PHP\\MyNameUnitTest',
'expected' => 'MyStandard.PHP.MyName',
],
'Sniff in external standard with namespace prefix' => [
Expand Down Expand Up @@ -192,6 +192,18 @@ public static function dataGetSniffCode()
'fqnClass' => 'CompanyName\\CustomSniffs\\Whatever\\CheckMeSniff',
'expected' => 'CompanyName.Whatever.CheckMe',
],
'Sniff provided via file include and doesn\'t comply with naming conventions [5]' => [
'fqnClass' => 'CompanyName\\Sniffs\\Category\\Sniff',
'expected' => 'CompanyName.Category.',
],
'Sniff provided via file include and doesn\'t comply with naming conventions [6]' => [
'fqnClass' => 'CompanyName\\Tests\\Category\\UnitTest',
'expected' => 'CompanyName.Category.',
],
'Sniff provided via file include and doesn\'t comply with naming conventions [7]' => [
'fqnClass' => 'Sniffs\\Category\\NamedSniff',
'expected' => '.Category.Named',
],
];

}//end dataGetSniffCode()
Expand Down